Browse Source

语言转义示例暂存

master
安虹睿 1 year ago
parent
commit
1400792336
  1. 5
      Code/Fe/src/components/umyTable/index.vue
  2. 30
      Code/Fe/src/lang/en.js
  3. 14
      Code/Fe/src/lang/zh.js
  4. 18
      Code/Fe/src/utils/defaultButtons.js

5
Code/Fe/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'"
>
<template #header>
<span>操作</span>
<span>{{ $t('common.handle') }}</span>
</template>
<template slot-scope="scope">
<el-button
@ -51,7 +50,7 @@
:header-align="'center'"
>
<template #header>
<span>操作</span>
<span>{{ $t('common.handle') }}</span>
</template>
<template slot-scope="scope">
<el-button

30
Code/Fe/src/lang/en.js

@ -1,5 +1,33 @@
export default {
// todo:后期做语言时候统一处理,暂时都使用中文
// common: {
// home:'Home',
// handle:'Operate',
// },
// btns:{
// add:'Create',
// filter:'Filtrate',
// fresh:'Refresh',
// field:'Field Setting',
// export:'Export File',
// import:'Import File',
// edit:'Edit',
// delete:'Delete',
// DetailedQuery:'Detailed Query'
// },
common: {
home:'home'
home:'Home',
handle:'操作',
},
btns:{
add:'新增',
filter:'筛选',
fresh:'刷新',
field:'字段设置',
export:'导出',
import:'导入',
edit:'编辑',
delete:'删除',
DetailedQuery:'明细查询'
}
}

14
Code/Fe/src/lang/zh.js

@ -1,5 +1,17 @@
export default {
common: {
home:'系统首页'
home:'系统首页',
handle:'操作',
},
btns:{
add:'新增',
filter:'筛选',
fresh:'刷新',
field:'字段设置',
export:'导出',
import:'导入',
edit:'编辑',
delete:'删除',
DetailedQuery:'明细查询'
}
}

18
Code/Fe/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,
}
}
}
Loading…
Cancel
Save