更新了组件
This commit is contained in:
parent
01b962d963
commit
41669abfe3
|
@ -46,6 +46,8 @@ const options = reactive([
|
||||||
const actIndex = ref(0)
|
const actIndex = ref(0)
|
||||||
const townLists = ref([])
|
const townLists = ref([])
|
||||||
|
|
||||||
|
const emit = defineEmits(['handTown', 'handArea'])
|
||||||
|
|
||||||
// 选择区/县
|
// 选择区/县
|
||||||
const handChose = (index) => {
|
const handChose = (index) => {
|
||||||
actIndex.value = index;
|
actIndex.value = index;
|
||||||
|
@ -53,6 +55,7 @@ const handChose = (index) => {
|
||||||
options.forEach(item => {
|
options.forEach(item => {
|
||||||
if (item.value == options[index].value) {
|
if (item.value == options[index].value) {
|
||||||
sendFn('choserArea', { name: item.label, code: item.value })
|
sendFn('choserArea', { name: item.label, code: item.value })
|
||||||
|
emit('handArea', options[actIndex.value].value,)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -67,6 +70,7 @@ const handTown = (index)=>{
|
||||||
townLists.value.forEach(item => {
|
townLists.value.forEach(item => {
|
||||||
if (item.code == townLists.value[index].code) {
|
if (item.code == townLists.value[index].code) {
|
||||||
sendFn('choseTown', { name: item.name })
|
sendFn('choseTown', { name: item.name })
|
||||||
|
emit('handTown', options[actIndex.value].value, item.code)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue