mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-15 14:03:36 +08:00
perf: 优化国际化
This commit is contained in:
@@ -65,8 +65,8 @@ VXETable.setup({
|
||||
i18n: (key, args) => i18n.global.t(key, args),
|
||||
// 可选,对参数中的列头、校验提示..等进行自动翻译(只对支持国际化的有效)
|
||||
translate(key, args) {
|
||||
// 例如,只翻译 "message." 开头的键值
|
||||
if (key && key.indexOf("message.") > -1) {
|
||||
// 例如,只翻译 "buttons." 开头的键值
|
||||
if (key && key.indexOf("buttons.") > -1) {
|
||||
return i18n.global.t(key, args);
|
||||
}
|
||||
if (key && key.indexOf("el.") > -1) {
|
||||
|
||||
Reference in New Issue
Block a user