mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 10:44:59 +00:00
[improvement] DropdowmMenu: optimize rect calc (#3488)
This commit is contained in:
@@ -44,7 +44,7 @@ export default sfc({
|
|||||||
toggleItem(active) {
|
toggleItem(active) {
|
||||||
const { menu } = this.$refs;
|
const { menu } = this.$refs;
|
||||||
const rect = menu.getBoundingClientRect();
|
const rect = menu.getBoundingClientRect();
|
||||||
this.top = rect.top + rect.height;
|
this.top = rect.bottom;
|
||||||
|
|
||||||
this.children.forEach((item, index) => {
|
this.children.forEach((item, index) => {
|
||||||
if (index === active) {
|
if (index === active) {
|
||||||
|
Reference in New Issue
Block a user