mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs(Area): use composition api
This commit is contained in:
parent
1e79f28ae5
commit
7d2678764c
@ -20,12 +20,13 @@
|
|||||||
</demo-block>
|
</demo-block>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
|
import { ref } from 'vue';
|
||||||
import AreaList from './area';
|
import AreaList from './area';
|
||||||
import AreaListEn from './area-en';
|
import AreaListEn from './area-en';
|
||||||
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
export default {
|
const i18n = {
|
||||||
i18n: {
|
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
title2: '选中省市区',
|
title2: '选中省市区',
|
||||||
title3: '配置显示列',
|
title3: '配置显示列',
|
||||||
@ -40,11 +41,16 @@ export default {
|
|||||||
columnsPlaceholder: ['Choose', 'Choose', 'Choose'],
|
columnsPlaceholder: ['Choose', 'Choose', 'Choose'],
|
||||||
areaList: AreaListEn,
|
areaList: AreaListEn,
|
||||||
},
|
},
|
||||||
},
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
setup() {
|
||||||
|
const t = useTranslate(i18n);
|
||||||
|
const value = ref('330302');
|
||||||
|
|
||||||
data() {
|
|
||||||
return {
|
return {
|
||||||
value: '330302',
|
t,
|
||||||
|
value,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user