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
+21 -14
View File
@@ -31,21 +31,28 @@
</demo-block>
</template>
<script>
<script lang="ts">
import { useTranslate } from '@demo/use-translate';
const i18n = {
'zh-CN': {
max: '最大值',
standalone: '独立展示',
customColor: '自定义颜色',
customContent: '自定义徽标内容',
},
'en-US': {
max: 'Max',
standalone: 'Standalone',
customColor: 'Custom Color',
customContent: 'Custom Content',
},
};
export default {
i18n: {
'zh-CN': {
max: '最大值',
standalone: '独立展示',
customColor: '自定义颜色',
customContent: '自定义徽标内容',
},
'en-US': {
max: 'Max',
standalone: 'Standalone',
customColor: 'Custom Color',
customContent: 'Custom Content',
},
setup() {
const t = useTranslate(i18n);
return { t };
},
};
</script>