[update 全局] 全局增加判断当前语言的方法,用于判断当前语言

This commit is contained in:
danshihao
2024-08-06 14:42:14 +08:00
parent 8157c972ba
commit 388ba1614b
+8
View File
@@ -74,6 +74,14 @@ SSO.init(() => {
Vue.prototype.global = {
emptyLine: '—'
}
// 当前是中文
Vue.prototype.isChinese = function () {
return this.$i18n.locale === 'zh-cn'
}
// 当前是英文
Vue.prototype.isEnglish = function () {
return this.$i18n.locale === 'en-us'
}
function main () {
new Vue({