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
+33 -26
View File
@@ -64,33 +64,40 @@
</demo-block>
</template>
<script>
<script lang="ts">
import { useTranslate } from '@demo/use-translate';
const i18n = {
'zh-CN': {
text: '文字',
route: '页面导航',
gutter: '格子间距',
square: '正方形格子',
columnNum: '自定义列数',
customContent: '自定义内容',
urlRoute: 'URL 跳转',
vueRoute: '路由跳转',
showBadge: '徽标提示',
horizontal: '内容横排',
},
'en-US': {
text: 'Text',
route: 'Route',
gutter: 'Gutter',
square: 'Square',
columnNum: 'Column Num',
customContent: 'Custom Content',
urlRoute: 'URL',
vueRoute: 'Vue Router',
showBadge: 'Show Badge',
horizontal: 'Horizontal',
},
};
export default {
i18n: {
'zh-CN': {
text: '文字',
route: '页面导航',
gutter: '格子间距',
square: '正方形格子',
columnNum: '自定义列数',
customContent: '自定义内容',
urlRoute: 'URL 跳转',
vueRoute: '路由跳转',
showBadge: '徽标提示',
horizontal: '内容横排',
},
'en-US': {
text: 'Text',
route: 'Route',
gutter: 'Gutter',
square: 'Square',
columnNum: 'Column Num',
customContent: 'Custom Content',
urlRoute: 'URL',
vueRoute: 'Vue Router',
showBadge: 'Show Badge',
horizontal: 'Horizontal',
},
setup() {
const t = useTranslate(i18n);
return { t };
},
};
</script>