docs: remove legacy locale mixin

This commit is contained in:
chenjiahan
2020-12-15 17:01:55 +08:00
parent 7c3935dc4c
commit 54fab50c3c
18 changed files with 488 additions and 432 deletions
+23 -16
View File
@@ -34,23 +34,30 @@
</demo-block>
</template>
<script>
<script lang="ts">
import { useTranslate } from '@demo/use-translate';
const i18n = {
'zh-CN': {
text: '文本',
dashed: '虚线',
withText: '展示文本',
contentPosition: '内容位置',
customStyle: '自定义样式',
},
'en-US': {
text: 'Text',
dashed: 'Dashed',
withText: 'With Text',
contentPosition: 'Content Position',
customStyle: 'Custom Style',
},
};
export default {
i18n: {
'zh-CN': {
text: '文本',
dashed: '虚线',
withText: '展示文本',
contentPosition: '内容位置',
customStyle: '自定义样式',
},
'en-US': {
text: 'Text',
dashed: 'Dashed',
withText: 'With Text',
contentPosition: 'Content Position',
customStyle: 'Custom Style',
},
setup() {
const t = useTranslate(i18n);
return { t };
},
};
</script>