docs(Area): use composition api

This commit is contained in:
chenjiahan 2020-12-13 12:36:22 +08:00
parent 1e79f28ae5
commit 7d2678764c

View File

@ -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,
}; };
}, },
}; };