From 73ac40ea0ab9d6f1ace3e443eb2b8f9715a1a87b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com>
Date: Tue, 1 Aug 2023 10:41:37 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AF=AD=E8=A8=80=E8=BD=AC=E4=B9=89=E7=A4=BA?=
=?UTF-8?q?=E4=BE=8B=E6=9A=82=E5=AD=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/umyTable/index.vue | 5 ++--
PC/UI.WinIn.FasterZ.Store/src/lang/en.js | 30 ++++++++++++++++++-
PC/UI.WinIn.FasterZ.Store/src/lang/index.js | 3 +-
PC/UI.WinIn.FasterZ.Store/src/lang/zh.js | 14 ++++++++-
.../src/utils/defaultButtons.js | 18 +++++------
5 files changed, 55 insertions(+), 15 deletions(-)
diff --git a/PC/UI.WinIn.FasterZ.Store/src/components/umyTable/index.vue b/PC/UI.WinIn.FasterZ.Store/src/components/umyTable/index.vue
index 9390c20..2e7b74d 100644
--- a/PC/UI.WinIn.FasterZ.Store/src/components/umyTable/index.vue
+++ b/PC/UI.WinIn.FasterZ.Store/src/components/umyTable/index.vue
@@ -4,7 +4,6 @@
:id="_uid"
:key="isUpdate"
v-loading="tableLoading"
- element-loading-text="拼命加载中..."
@sort-change="sortChange"
@selection-change="handleSelectionChange"
ref="multipleTable"
@@ -29,7 +28,7 @@
:header-align="'center'"
>
- 操作
+ {{ $t('common.handle') }}
- 操作
+ {{ $t('common.handle') }}
i18n.t(key, value))
+// todo:element的i18n语言转义,开始使用i18n时候打开下方代码
+// locale.i18n((key, value) => i18n.t(key, value))
export default i18n
\ No newline at end of file
diff --git a/PC/UI.WinIn.FasterZ.Store/src/lang/zh.js b/PC/UI.WinIn.FasterZ.Store/src/lang/zh.js
index 7460042..1e47023 100644
--- a/PC/UI.WinIn.FasterZ.Store/src/lang/zh.js
+++ b/PC/UI.WinIn.FasterZ.Store/src/lang/zh.js
@@ -1,5 +1,17 @@
export default {
common: {
- home:'系统首页'
+ home:'系统首页',
+ handle:'操作',
+ },
+ btns:{
+ add:'新增',
+ filter:'筛选',
+ fresh:'刷新',
+ field:'字段设置',
+ export:'导出',
+ import:'导入',
+ edit:'编辑',
+ delete:'删除',
+ DetailedQuery:'明细查询'
}
}
\ No newline at end of file
diff --git a/PC/UI.WinIn.FasterZ.Store/src/utils/defaultButtons.js b/PC/UI.WinIn.FasterZ.Store/src/utils/defaultButtons.js
index cbac76d..ef91b38 100644
--- a/PC/UI.WinIn.FasterZ.Store/src/utils/defaultButtons.js
+++ b/PC/UI.WinIn.FasterZ.Store/src/utils/defaultButtons.js
@@ -1,4 +1,5 @@
// 页面基础按钮样式
+import i18n from "@/lang"
/**
* 如果需要更改配置,格式如:defaultExportBtn({label:'自定义'})
* @param {*} option
@@ -10,7 +11,7 @@ export function defaultAddBtn(option) {
return __defaultBtnOption(option,{
type: "primary",
icon: "el-icon-plus",
- label: "新增",
+ label: i18n.t('btns.add'),
name: "newly",
size: "mini",
background:"#31bb99"
@@ -22,7 +23,7 @@ export function defaultImportBtn(option) {
return __defaultBtnOption(option,{
type: "primary",
icon: "el-icon-bottom-left",
- label: "导入",
+ label: i18n.t('btns.import'),
name: "import",
size: "mini",
})
@@ -33,7 +34,7 @@ export function defaultExportBtn(option) {
return __defaultBtnOption(option,{
type: "primary",
icon: "el-icon-top-right",
- label: "导出",
+ label: i18n.t('btns.export'),
name: "export",
size: "mini",
})
@@ -62,7 +63,7 @@ export function defaultFieldSettingBtn(option,source) {
// type: _type,//暂不处理颜色
plain: true,
icon: "el-icon-setting",
- label: "字段设置",
+ label: i18n.t('btns.field'),
name: "field",
size: "mini",
float: 'right',
@@ -74,7 +75,7 @@ export function defaultFieldSettingBtn(option,source) {
export function defaultFreshBtn(option) {
return __defaultBtnOption(option,{
icon: "el-icon-refresh",
- label: "刷新",
+ label: i18n.t('btns.fresh'),
name: "refresh",
size: "mini",
float: 'right'
@@ -86,7 +87,7 @@ export function defaultFilterBtn(option) {
return __defaultBtnOption(option,{
type: "primary",
icon: "el-icon-finished",
- label: "筛选",
+ label: i18n.t('btns.filter'),
name: "filter",
size: "mini",
float: 'right'
@@ -98,7 +99,7 @@ export function defaultFilterForDetailBtn(option) {
return __defaultBtnOption(option,{
type: "warning",
icon: "el-icon-finished",
- label: "明细查询",
+ label: i18n.t('btns.DetailedQuery'),
name: "filterForDetail",
size: "mini",
float: 'right',
@@ -121,5 +122,4 @@ function __defaultBtnOption(option,specific){
isDetailExport:option && option.isDetailExport ? option.isDetailExport : false,
isRedundance:option && option.isRedundance ? option.isRedundance : false,
}
-}
-
+}
\ No newline at end of file