| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { useAllAreaList } from '@12333/hooks'; |
| | | import { useAllAreaList, useAreaTree } from '@12333/hooks'; |
| | | import Category from './Category.vue'; |
| | | import CategoryPane from './CategoryPane.vue'; |
| | | import { reactive, computed, watch } from 'vue'; |
| | |
| | | // }, |
| | | // }); |
| | | |
| | | const { areaTreeList } = useAllAreaList(); |
| | | const { areaTree } = useAreaTree(); |
| | | |
| | | const state = reactive({ |
| | | provinceIndex: 0, |
| | | preModelValue: props.modelValue, |
| | | }); |
| | | |
| | | const provinceList = computed(() => areaTreeList.value.map((x) => ({ ...x, name: x.areaName }))); |
| | | const provinceList = computed(() => areaTree.value.map((x) => ({ ...x, name: x.areaName }))); |
| | | const categoryChild = computed(() => { |
| | | if (!provinceList.value.length) { |
| | | return []; |