1
0

2 Commits f861561143 ... bc8491bd24

Autor SHA1 Nachricht Datum
  zhaosm bc8491bd24 Merge branch 'dev' into zhaosm vor 4 Tagen
  luxf cc027013f7 分类下拉组件 vor 4 Tagen
1 geänderte Dateien mit 9 neuen und 2 gelöschten Zeilen
  1. 9 2
      components/common/u-dropdown-select/index.vue

+ 9 - 2
components/common/u-dropdown-select/index.vue

@@ -6,7 +6,7 @@
 		</view>
 		<view v-if="showOptions" class="u-dropdown-select-mask" :style="{ 'top': offsetTop +'px' }" @click="showOptions = false"></view>
 		<view v-if="showOptions" class="u-dropdown-panel" :style="{ 'top': offsetTop +'px' }">
-			<view class="u-dropdown-tabs">
+			<view v-if="tabs.length" class="u-dropdown-tabs">
 				<u-tabs :active.sync="tabActive" :tabs="tabs" tab-style="tag" @change="tabChange"/>
 			</view>
 			<view class="u-dropdown-options">
@@ -126,7 +126,7 @@
 					if (option.tab) {
 						this.label = option.tab.label + ' / ' + option.item.label
 					} else {
-						this.label = option.item.label
+						this.label = option.label
 					}
 				} else {
 					this.label = ''
@@ -183,6 +183,13 @@
 				}
 			},
 			cleanListActive() {
+				if (this.tabs && this.tabs.length) {
+					for (const tab of this.tabs) {
+						tab.children.forEach(item => {
+							this.$set(item, 'active', false)
+						})
+					}
+				}
 				this.list.forEach(item => {
 					this.$set(item, 'active', false)
 				})