refactor: use setup refactor

This commit is contained in:
xiaoxian521
2021-09-19 01:12:46 +08:00
parent 85f4917f26
commit afff1d677b
18 changed files with 128 additions and 106 deletions

View File

@@ -7,6 +7,7 @@ import enVxeTable from "vxe-table/lib/locale/lang/en-US";
import enLocale from "element-plus/lib/locale/lang/en";
import zhLocale from "element-plus/lib/locale/lang/zh-cn";
// 导航菜单配置
export const menusConfig = {
zh: {
message: {

View File

@@ -1,7 +1,7 @@
import "xe-utils";
import { App } from "vue";
import { i18n } from "../i18n/index";
import "font-awesome/css/font-awesome.css";
import "xe-utils";
import {
// 核心
VXETable,
@@ -62,6 +62,7 @@ VXETable.setup({
clearable: true
},
// 对组件内置的提示语进行国际化翻译
// @ts-ignore
i18n: (key, args) => i18n.global.t(key, args),
// 可选,对参数中的列头、校验提示..等进行自动翻译(只对支持国际化的有效)
translate(key, args) {