diff --git a/src/view/components/areaChose.vue b/src/view/components/areaChose.vue index a2398a6..c86fea5 100644 --- a/src/view/components/areaChose.vue +++ b/src/view/components/areaChose.vue @@ -46,6 +46,8 @@ const options = reactive([ const actIndex = ref(0) const townLists = ref([]) +const emit = defineEmits(['handTown', 'handArea']) + // 选择区/县 const handChose = (index) => { actIndex.value = index; @@ -53,6 +55,7 @@ const handChose = (index) => { options.forEach(item => { if (item.value == options[index].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 => { if (item.code == townLists.value[index].code) { sendFn('choseTown', { name: item.name }) + emit('handTown', options[actIndex.value].value, item.code) } }) }