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
+29 -22
View File
@@ -42,29 +42,36 @@
</demo-block>
</template>
<script>
<script lang="ts">
import { useTranslate } from '@demo/use-translate';
const i18n = {
'zh-CN': {
text: '在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。',
mode: '通知栏模式',
content: '内容',
wrapable: '多行展示',
shortText: '技术是开发它的人的共同灵魂。',
scrollable: '滚动播放',
customStyle: '自定义样式',
verticalScroll: '垂直滚动',
},
'en-US': {
text: 'Technology is the common soul of the people who developed it.',
mode: 'Mode',
content: 'Content',
wrapable: 'Wrapable',
shortText: 'Some short text.',
customStyle: 'Custom Style',
scrollable: 'Scrollable',
verticalScroll: 'Vertical Scroll',
},
};
export default {
i18n: {
'zh-CN': {
text: '在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。',
mode: '通知栏模式',
content: '内容',
wrapable: '多行展示',
shortText: '技术是开发它的人的共同灵魂。',
scrollable: '滚动播放',
customStyle: '自定义样式',
verticalScroll: '垂直滚动',
},
'en-US': {
text: 'Technology is the common soul of the people who developed it.',
mode: 'Mode',
content: 'Content',
wrapable: 'Wrapable',
shortText: 'Some short text.',
customStyle: 'Custom Style',
scrollable: 'Scrollable',
verticalScroll: 'Vertical Scroll',
},
setup() {
const t = useTranslate(i18n);
return { t };
},
};
</script>