修复选择器bug,新增较小、较大窗口设置

This commit is contained in:
lyswhut
2020-03-13 13:38:02 +08:00
parent 527143405f
commit 6d51240a27
10 changed files with 44 additions and 14 deletions
@@ -79,7 +79,7 @@ export default {
}
checked = bool
} else {
checked = this.bool ? this.value : ''
checked = this.bool == null ? '' : this.value
}
this.$emit('input', checked)
this.$emit('change', checked)
+7 -3
View File
@@ -5,7 +5,7 @@
div(:class="$style.icon")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 451.847 451.847' space='preserve')
use(xlink:href='#icon-down')
div.scroll(:class="$style.list" :style="{ width: windowSizeActive.tabList }" @click.stop ref="dom_list")
div.scroll(:class="$style.list" :style="{ width: listWidth + 'PX' }" @click.stop ref="dom_list")
div(:class="$style.tag" @click="handleClick(null)") {{$t('material.tag_list.default')}}
dl(v-for="type in list")
dt(:class="$style.type") {{type.name}}
@@ -23,12 +23,16 @@ export default {
return []
},
},
listWidth: {
type: Number,
default: 645,
},
value: {
type: Object,
},
},
computed: {
...mapGetters(['setting', 'windowSizeActive']),
...mapGetters(['setting']),
},
data() {
return {
@@ -130,7 +134,7 @@ export default {
.list {
position: absolute;
top: 100%;
width: 646px;
width: 645px;
left: 0;
border-bottom: 2px solid @color-tab-border-bottom;
border-right: 2px solid @color-tab-border-bottom;