kz-ui-base 1.0.151 → 1.0.153

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,12 +22,12 @@
22
22
  size="small"
23
23
  type="primary"
24
24
  @click="handleConfirm"
25
- >{{ _confirmText }}
25
+ >{{ confirmText }}
26
26
  </el-button>
27
27
  <el-button
28
28
  size="small"
29
29
  @click="handleClose"
30
- >{{ _cancelText }}
30
+ >{{ cancelText }}
31
31
  </el-button>
32
32
  </div>
33
33
  </div>
@@ -44,11 +44,11 @@ export default {
44
44
  },
45
45
  confirmText: {
46
46
  type: String,
47
- default: ''
47
+ default: '确定'
48
48
  },
49
49
  cancelText: {
50
50
  type: String,
51
- default: ''
51
+ default: '关闭'
52
52
  },
53
53
  visible: {
54
54
  type: Boolean,
@@ -66,25 +66,12 @@ export default {
66
66
  submitLoading: false
67
67
  }
68
68
  },
69
- computed: {
70
- // 确定按钮文本,支持国际化
71
- _confirmText() {
72
- return this.confirmText || this.t('component.dialog.confirm') || '确定'
73
- },
74
- // 取消按钮文本,支持国际化
75
- _cancelText() {
76
- return this.cancelText || this.t('component.dialog.cancel') || '关闭'
77
- }
78
- },
79
69
  watch: {
80
70
  visible(val) {
81
71
  this.modalState = val
82
72
  }
83
73
  },
84
74
  methods: {
85
- t(key) {
86
- return this.$t(key) || key
87
- },
88
75
  handleConfirm() {
89
76
  this.$emit('on-confirm')
90
77
  },
@@ -1,24 +1,6 @@
1
1
  import Vue from "vue";
2
- import zhCN from "element-ui/lib/locale/lang/zh-CN";
3
- import enUS from "element-ui/lib/locale/lang/en";
4
- import ElementLocale from "element-ui/lib/locale";
5
-
6
- // 根据当前语言设置配置 Element UI 语言
7
- function initElementLocale() {
8
- const currentLocale = localStorage.getItem("locale") || "zh_CN";
9
- if (currentLocale === "en_US") {
10
- ElementLocale.use(enUS);
11
- } else {
12
- ElementLocale.use(zhCN);
13
- }
14
- }
15
-
16
- // 初始化 Element UI 语言
17
- initElementLocale();
18
2
 
19
3
  function makeDialog(option) {
20
- // 每次创建对话框时重新初始化语言
21
- initElementLocale();
22
4
  var dom = document.createElement("div");
23
5
  document.getElementsByTagName("body")[0].appendChild(dom);
24
6
  let tpl =
@@ -129,8 +111,6 @@ function makeDialog(option) {
129
111
  return vue;
130
112
  }
131
113
  function makeDrawer(option) {
132
- // 每次创建抽屉时重新初始化语言
133
- initElementLocale();
134
114
  var dom = document.createElement("div");
135
115
  document.getElementsByTagName("body")[0].appendChild(dom);
136
116
  let tpl =
@@ -3249,42 +3249,42 @@ export default class listBasePage extends Vue {
3249
3249
  }
3250
3250
  cellStayle(row) {}
3251
3251
  mounted() {
3252
- // 为 listColumns 中每个对象添加 text 属性
3253
- if (this.listColumns) {
3254
- this.listColumns.forEach((col: any) => {
3255
- if (col.property) {
3256
- col.text = (this as any).t(`${this.moduleName}.${this.serviceName}.${col.property}`);
3257
- }
3258
- });
3259
- }
3252
+ // // 为 listColumns 中每个对象添加 text 属性
3253
+ // if (this.listColumns) {
3254
+ // this.listColumns.forEach((col: any) => {
3255
+ // if (col.property) {
3256
+ // col.text = (this as any).t(`${this.moduleName}.${this.serviceName}.${col.property}`);
3257
+ // }
3258
+ // });
3259
+ // }
3260
3260
 
3261
- // 为 searchRules 中每个对象添加 text 属性
3262
- if (this.searchRules) {
3263
- this.searchRules.forEach((rule: any) => {
3264
- if (rule.property) {
3265
- rule.text = (this as any).t(`${this.moduleName}.${this.serviceName}.${rule.property}`);
3266
- }
3267
- });
3268
- }
3261
+ // // 为 searchRules 中每个对象添加 text 属性
3262
+ // if (this.searchRules) {
3263
+ // this.searchRules.forEach((rule: any) => {
3264
+ // if (rule.property) {
3265
+ // rule.text = (this as any).t(`${this.moduleName}.${this.serviceName}.${rule.property}`);
3266
+ // }
3267
+ // });
3268
+ // }
3269
3269
 
3270
- // 为 editColumns 中每个对象添加 text 属性
3271
- if (this.editColumns) {
3272
- this.editColumns.forEach((col: any) => {
3273
- if (col.property) {
3274
- col.text = (this as any).t(`${this.moduleName}.${this.serviceName}.${col.property}`);
3275
- }
3276
- });
3277
- }
3270
+ // // 为 editColumns 中每个对象添加 text 属性
3271
+ // if (this.editColumns) {
3272
+ // this.editColumns.forEach((col: any) => {
3273
+ // if (col.property) {
3274
+ // col.text = (this as any).t(`${this.moduleName}.${this.serviceName}.${col.property}`);
3275
+ // }
3276
+ // });
3277
+ // }
3278
3278
 
3279
- // 为 editSetting.listSetting.listColumns 中每个对象添加 text 属性
3280
- if (this.editSetting?.listSetting?.listColumns) {
3281
- const listSetting: any = this.editSetting.listSetting;
3282
- listSetting.listColumns.forEach((col: any) => {
3283
- if (col.property) {
3284
- col.text = (this as any).t(`${listSetting.moduleName}.${listSetting.serviceName}.${col.property}`);
3285
- }
3286
- });
3287
- }
3279
+ // // 为 editSetting.listSetting.listColumns 中每个对象添加 text 属性
3280
+ // if (this.editSetting?.listSetting?.listColumns) {
3281
+ // const listSetting: any = this.editSetting.listSetting;
3282
+ // listSetting.listColumns.forEach((col: any) => {
3283
+ // if (col.property) {
3284
+ // col.text = (this as any).t(`${listSetting.moduleName}.${listSetting.serviceName}.${col.property}`);
3285
+ // }
3286
+ // });
3287
+ // }
3288
3288
 
3289
3289
  var that = this;
3290
3290
  if (this.listSetting.isShowSumRow) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kz-ui-base",
3
- "version": "1.0.151",
3
+ "version": "1.0.153",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {