xiaoxian521
3 years ago
16 changed files with 132 additions and 26 deletions
-
3mock/asyncRoutes.ts
-
38src/components/ReIcon/index.ts
-
9src/layout/components/navbar.vue
-
7src/layout/components/sidebar/breadCrumb.vue
-
36src/layout/components/sidebar/sidebarItem.vue
-
6src/layout/components/tag/index.vue
-
3src/layout/types.ts
-
7src/plugins/element-plus/index.ts
-
16src/router/index.ts
-
3src/router/modules/error.ts
-
2src/router/modules/externalLink.ts
-
2src/router/modules/home.ts
-
2src/router/modules/remaining.ts
-
19src/utils/i18n.ts
-
2src/utils/storage/index.ts
-
3src/utils/storage/responsive.ts
@ -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; |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue