docs: simplify $t to t

This commit is contained in:
chenjiahan
2020-03-21 14:46:02 +08:00
parent 10f32d6619
commit d8fa4b9495
80 changed files with 918 additions and 950 deletions

View File

@@ -21,7 +21,7 @@ let demoUid = 0;
// helper for demo locales
Vue.mixin({
computed: {
$t() {
t() {
const { name } = this.$options;
const { lang = 'zh-CN' } = (this.$route && this.$route.meta) || {};
const prefix = name ? camelize(name) + '.' : '';