|
|
@@ -4,7 +4,7 @@
|
|
|
<input class="app-region__input" v-model="inputValue" :placeholder="placeholder" readonly />
|
|
|
</slot>
|
|
|
<Popup v-model:show="show" position="bottom" teleport="body" round>
|
|
|
- <Cascader :title="title" v-model="selectedValue" :options="options" @close="show = false" @change="onChange"
|
|
|
+ <Cascader :title="title" v-model="selectedValue" :placeholder="i18n.global.t('common.choice')" :options="options" @close="show = false" @change="onChange"
|
|
|
@finish="onFinish" />
|
|
|
</Popup>
|
|
|
</div>
|
|
|
@@ -15,6 +15,7 @@ import { shallowRef, computed, watch } from 'vue'
|
|
|
import { Popup, Cascader, CascaderOption } from 'vant'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { getDivisions } from '@/services/api/common'
|
|
|
+import { i18n } from "@/stores";
|
|
|
|
|
|
const props = defineProps({
|
|
|
modelValue: {
|
|
|
@@ -26,7 +27,7 @@ const props = defineProps({
|
|
|
},
|
|
|
title: {
|
|
|
type: String,
|
|
|
- default: '请选择地区'
|
|
|
+ default: i18n.global.t('common.choice3')
|
|
|
},
|
|
|
readonly: {
|
|
|
type: Boolean,
|
|
|
@@ -34,7 +35,7 @@ const props = defineProps({
|
|
|
},
|
|
|
placeholder: {
|
|
|
type: String,
|
|
|
- default: '请选择'
|
|
|
+ default: i18n.global.t('common.choice')
|
|
|
},
|
|
|
})
|
|
|
|
|
|
@@ -87,7 +88,7 @@ const arrayToTree = (list: Model.Region[]) => {
|
|
|
})
|
|
|
return result
|
|
|
}
|
|
|
- return getChildren('0086')
|
|
|
+ return getChildren('')
|
|
|
}
|
|
|
|
|
|
useRequest(getDivisions, {
|