select组件

This commit is contained in:
shijingjing
2023-03-20 19:16:12 +08:00
parent 5b81a23bb8
commit 99e5cfea09
2 changed files with 11 additions and 2 deletions

View File

@@ -41,6 +41,14 @@ export default {
})) : this.list || [] })) : this.list || []
} }
}, },
watch: {
selectedLabel: {
immediate: true,
handler(v) {
this.$emit('name', v)
}
}
},
data() { data() {
return { return {
dictKey: '', dictKey: '',

View File

@@ -1,8 +1,8 @@
<template> <template>
<div class="AppWxworkQrcode"> <div class="AppWxworkQrcode">
<div class="header"> <div class="header">
<AiSelect v-model="id" :list="dictList"> <AiSelect v-model="id" :list="dictList" @name="v=> idName = v">
<span class="label" v-if="id">{{ dictList[id].label }}</span> <span class="label" v-if="id">{{ idName }}</span>
<span v-else class="col-666">请选择</span> <span v-else class="col-666">请选择</span>
<u-icon name="arrow-down" color="#666" size="24" style="margin-left: 4px"></u-icon> <u-icon name="arrow-down" color="#666" size="24" style="margin-left: 4px"></u-icon>
</AiSelect> </AiSelect>
@@ -38,6 +38,7 @@ export default {
current: 0, current: 0,
list: [], list: [],
picUrl: '', picUrl: '',
idName: '',
} }
}, },
onShow() { onShow() {