diff --git a/.gitignore b/.gitignore index 999c4c54..f02e7fb4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /node_modules/* /.idea/* deploy.sh +yarn.lock diff --git a/uview-ui/components/u-dropdown/u-dropdown.vue b/uview-ui/components/u-dropdown/u-dropdown.vue index a62e469a..c3abe6c2 100644 --- a/uview-ui/components/u-dropdown/u-dropdown.vue +++ b/uview-ui/components/u-dropdown/u-dropdown.vue @@ -8,13 +8,13 @@ {{item.title}} - + @@ -123,8 +123,8 @@ zIndex: -1, opacity: 0 }, - // 让某个菜单保持高亮的状态 - highlightIndex: 99999, + // 让某个菜单保持高亮的状态 支持多个菜单高亮 + highlightIndex: [9999], contentHeight: 0 } }, @@ -173,7 +173,7 @@ // 打开下拉菜单 open(index) { // 重置高亮索引,否则会造成多个菜单同时高亮 - // this.highlightIndex = 9999; + // this.highlightIndex = [9999]; // 展开时,设置下拉内容的样式 this.contentStyle = { zIndex: 11, @@ -208,7 +208,7 @@ }, // 外部手动设置某个菜单高亮 highlight(index = undefined) { - this.highlightIndex = index !== undefined ? index : 99999; + this.highlightIndex = index !== undefined ? index : [9999]; }, // 获取下拉菜单内容的高度 getContentHeight() {