perf: 同步主分支代码

This commit is contained in:
xiaoxian521
2021-11-16 22:17:57 +08:00
parent 0f3d82a9b1
commit 4ef4768c65
16 changed files with 132 additions and 26 deletions

19
src/utils/i18n.ts Normal file
View File

@@ -0,0 +1,19 @@
import { i18n } from "../plugins/i18n";
/**
* 消息转换
* @param message message
* @param isI18n 如果true,获取对应的消息,否则返回this
* @returns message
*/
export function transformI18n(message = "", isI18n = false) {
if (!message) {
return "";
}
if (isI18n) {
//@ts-ignore
return i18n.global.tc.call(i18n.global, message);
} else {
return message;
}
}

View File

@@ -20,7 +20,7 @@ class sessionStorageProxy implements ProxyStorage {
// 取
public getItem(key: string): any {
return JSON.parse(this.storage.getItem(key)) || null;
return JSON.parse(this.storage.getItem(key));
}
// 删

View File

@@ -13,7 +13,8 @@ export const injectResponsiveStorage = (app: App, config: ServerConfigs) => {
parentPath: "/",
meta: {
title: "message.hshome",
icon: "el-icon-s-home",
i18n: true,
icon: "HomeFilled",
showLink: true
}
}