提交 ac08f5bb 编写于 作者: Q qiang

chore: build

上级 d600460c
......@@ -688,7 +688,7 @@ function initAppLocale (Vue, appVm, locale) {
};
Object.defineProperty(appVm, '$locale', {
get () {
return normalizeLocale(state.locale)
return state.locale
},
set (v) {
state.locale = v;
......
......@@ -1842,7 +1842,7 @@ var serviceContext = (function () {
};
Object.defineProperty(appVm, '$locale', {
get () {
return normalizeLocale$1(state.locale)
return state.locale
},
set (v) {
state.locale = v;
......@@ -1916,45 +1916,6 @@ var serviceContext = (function () {
])
}
}
function include$1 (str, parts) {
return !!parts.find((part) => str.indexOf(part) !== -1)
}
function startsWith$1 (str, parts) {
return parts.find((part) => str.indexOf(part) === 0)
}
function normalizeLocale$1 (locale, messages) {
if (!locale) {
return
}
locale = locale.trim().replace(/_/g, '-');
if (messages && messages[locale]) {
return locale
}
locale = locale.toLowerCase();
if (locale === 'chinese') {
// 支付宝
return LOCALE_ZH_HANS$1
}
if (locale.indexOf('zh') === 0) {
if (locale.indexOf('-hans') > -1) {
return LOCALE_ZH_HANS$1
}
if (locale.indexOf('-hant') > -1) {
return LOCALE_ZH_HANT$1
}
if (include$1(locale, ['-tw', '-hk', '-mo', '-cht'])) {
return LOCALE_ZH_HANT$1
}
return LOCALE_ZH_HANS$1
}
const lang = startsWith$1(locale, [LOCALE_EN$1, LOCALE_FR$1, LOCALE_ES$1]);
if (lang) {
return lang
}
}
// export function initI18n() {
// const localeKeys = Object.keys(__uniConfig.locales || {})
// if (localeKeys.length) {
......
......@@ -494,7 +494,7 @@ function initAppLocale (Vue, appVm, locale) {
};
Object.defineProperty(appVm, '$locale', {
get () {
return normalizeLocale(state.locale)
return state.locale
},
set (v) {
state.locale = v;
......
......@@ -494,7 +494,7 @@ function initAppLocale (Vue, appVm, locale) {
};
Object.defineProperty(appVm, '$locale', {
get () {
return normalizeLocale(state.locale)
return state.locale
},
set (v) {
state.locale = v;
......
......@@ -494,7 +494,7 @@ function initAppLocale (Vue, appVm, locale) {
};
Object.defineProperty(appVm, '$locale', {
get () {
return normalizeLocale(state.locale)
return state.locale
},
set (v) {
state.locale = v;
......
......@@ -494,7 +494,7 @@ function initAppLocale (Vue, appVm, locale) {
};
Object.defineProperty(appVm, '$locale', {
get () {
return normalizeLocale(state.locale)
return state.locale
},
set (v) {
state.locale = v;
......
......@@ -494,7 +494,7 @@ function initAppLocale (Vue, appVm, locale) {
};
Object.defineProperty(appVm, '$locale', {
get () {
return normalizeLocale(state.locale)
return state.locale
},
set (v) {
state.locale = v;
......
......@@ -494,7 +494,7 @@ function initAppLocale (Vue, appVm, locale) {
};
Object.defineProperty(appVm, '$locale', {
get () {
return normalizeLocale(state.locale)
return state.locale
},
set (v) {
state.locale = v;
......
......@@ -494,7 +494,7 @@ function initAppLocale (Vue, appVm, locale) {
};
Object.defineProperty(appVm, '$locale', {
get () {
return normalizeLocale(state.locale)
return state.locale
},
set (v) {
state.locale = v;
......
......@@ -504,7 +504,7 @@ function initAppLocale (Vue, appVm, locale) {
};
Object.defineProperty(appVm, '$locale', {
get () {
return normalizeLocale(state.locale)
return state.locale
},
set (v) {
state.locale = v;
......
......@@ -494,7 +494,7 @@ function initAppLocale (Vue, appVm, locale) {
};
Object.defineProperty(appVm, '$locale', {
get () {
return normalizeLocale(state.locale)
return state.locale
},
set (v) {
state.locale = v;
......
......@@ -494,7 +494,7 @@ function initAppLocale (Vue, appVm, locale) {
};
Object.defineProperty(appVm, '$locale', {
get () {
return normalizeLocale(state.locale)
return state.locale
},
set (v) {
state.locale = v;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册