feat(cli): add jest init file

This commit is contained in:
陈嘉涵
2019-12-12 10:55:34 +08:00
parent 24202028e5
commit 9155a7a491
6 changed files with 18 additions and 7 deletions

View File

@@ -8,7 +8,7 @@ Vue.mixin({
computed: {
$t() {
const { name } = this.$options;
const { lang } = this.$route.meta || {};
const { lang = 'zh-CN' } = (this.$route && this.$route.meta) || {};
const prefix = name ? camelize(name) + '.' : '';
const messages = this.$vantMessages[lang];
@@ -22,7 +22,7 @@ Vue.mixin({
beforeCreate() {
const { i18n, name } = this.$options;
if (i18n) {
if (i18n && name) {
const locales = {};
const camelizedName = camelize(name);