kz-ui-base 1.0.158 → 1.0.159

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.
@@ -72,13 +72,13 @@ export default class DatePicker extends Vue {
72
72
  public currentValue = (this as any).value;
73
73
  public type = "date";
74
74
  public placeholder =
75
- (this as any).setting && (this as any).setting.range ? "false" : "选择日期";
75
+ (this as any).setting && (this as any).setting.range ? "false" : (this as any).t('common.selectDate');
76
76
  public rangeSeparator =
77
- (this as any).setting && (this as any).setting.range ? "至" : "-";
77
+ (this as any).setting && (this as any).setting.range ? (this as any).t('common.to') : "-";
78
78
  public startPlaceholder =
79
- (this as any).setting && (this as any).setting.range ? "开始日期" : "";
79
+ (this as any).setting && (this as any).setting.range ? (this as any).t('common.startDate') : "";
80
80
  public endPlaceholder =
81
- (this as any).setting && (this as any).setting.range ? "结束日期" : "";
81
+ (this as any).setting && (this as any).setting.range ? (this as any).t('common.endDate') : "";
82
82
 
83
83
  created() {
84
84
  if (this.value) {
@@ -40,7 +40,7 @@
40
40
  :disabled="disabled ? true : column.disabled ? true : false"
41
41
  :filterable="filterable"
42
42
  :remote="remote"
43
- :placeholder="column.placeholder ? column.placeholder : '请选择'"
43
+ :placeholder="column.placeholder ? column.placeholder : t('common.pleaseSelect')"
44
44
  :remote-method="remoteMethod"
45
45
  :loading="remote ? loading : false"
46
46
  :multiple="multiple"
@@ -66,7 +66,7 @@
66
66
  :options="data"
67
67
  @input="updateValue"
68
68
  :normalizer="normalizer"
69
- placeholder="请选择"
69
+ :placeholder="t('common.pleaseSelect')"
70
70
  />
71
71
  </el-form-item>
72
72
 
@@ -96,7 +96,7 @@
96
96
  <el-input
97
97
  slot="reference"
98
98
  v-model="input"
99
- placeholder="请输入内容"
99
+ :placeholder="t('common.pleaseEnterContent')"
100
100
  @input="inputChange"
101
101
  ></el-input>
102
102
  </el-popover>
@@ -140,7 +140,7 @@
140
140
  :options="data"
141
141
  @input="updateValue"
142
142
  :normalizer="normalizer"
143
- placeholder="请选择"
143
+ :placeholder="t('common.pleaseSelect')"
144
144
  />
145
145
  </el-form-item>
146
146
  </template>
@@ -628,7 +628,7 @@ export default class dropDownList extends Vue {
628
628
  "dictLabel",
629
629
  "dictValue"
630
630
  );
631
- let newitems = [{ text: this.setting.allName?this.setting.allName:store.state.permission.allName?store.state.permission.allName:"---请选择---", value: undefined }];
631
+ let newitems = [{ text: this.setting.allName?this.setting.allName:store.state.permission.allName?store.state.permission.allName:(this as any).t('common.pleaseSelectAll'), value: undefined }];
632
632
  items.forEach((item) => {
633
633
  if (item.text.indexOf(this.setting.findValue) != -1) {
634
634
  newitems.push(item);
@@ -733,7 +733,7 @@ export default class dropDownList extends Vue {
733
733
  this.setting.displayField || "componentName",
734
734
  this.setting.valueField || "id"
735
735
  );
736
- let newitems = [{ text:this.setting.allName?this.setting.allName:store.state.permission.allName?store.state.permission.allName:"---请选择---", value: undefined }];
736
+ let newitems = [{ text:this.setting.allName?this.setting.allName:store.state.permission.allName?store.state.permission.allName:(this as any).t('common.pleaseSelectAll'), value: undefined }];
737
737
  items.forEach((item: any) => {
738
738
  if (item.value) {
739
739
  if (
@@ -836,7 +836,7 @@ export default class dropDownList extends Vue {
836
836
  if (!valueField) valueField = this.setting.valueField;
837
837
  var items = [];
838
838
  if (this.setting.isShowPleaseChoose != false)
839
- items.push({ text:this.setting.allName?this.setting.allName:store.state.permission.allName?store.state.permission.allName:"---请选择---", value: undefined });
839
+ items.push({ text:this.setting.allName?this.setting.allName:store.state.permission.allName?store.state.permission.allName:(this as any).t('common.pleaseSelectAll'), value: undefined });
840
840
  if (source) {
841
841
  this.itemList = source;
842
842
  for (var item of source) {
@@ -845,7 +845,7 @@ export default class dropDownList extends Vue {
845
845
  }
846
846
  /*console.log("下拉",items);*/
847
847
  if (this.column.setting && this.column.setting.chooseFirst) {
848
- if (items[0].text ==this.setting.allName?this.setting.allName:store.state.permission.allName?store.state.permission.allName:"---请选择---" || items[0].text == "请选择") {
848
+ if (items[0].text ==this.setting.allName?this.setting.allName:store.state.permission.allName?store.state.permission.allName:(this as any).t('common.pleaseSelectAll') || items[0].text == (this as any).t('common.pleaseSelect')) {
849
849
  this.$set(this.entity, String(this.column.property), items[1].text);
850
850
  this.onChangeEvent(this.entity[this.column.property], true);
851
851
  } else {
@@ -26,9 +26,9 @@
26
26
  type="primary"
27
27
  :loading="tableSetting.submitLoading"
28
28
  @click="submitForm"
29
- >确 定</el-button
29
+ >{{ t('common.confirm') }}</el-button
30
30
  >
31
- <el-button @click="cancel">取 消</el-button>
31
+ <el-button @click="cancel">{{ t('common.cancel') }}</el-button>
32
32
  </div>
33
33
  </slot>
34
34
  </div>
@@ -59,7 +59,7 @@ export default class lookupDialog extends Vue {
59
59
  // 提交状态
60
60
  submitLoading: false,
61
61
  // 弹出层标题
62
- title: "请选择",
62
+ title: (this as any).t('common.pleaseSelect'),
63
63
  // 保存时是否自动关闭
64
64
  isCloseOnSave: true,
65
65
  // 启用多选模式
@@ -26,7 +26,7 @@
26
26
  size=""
27
27
  :disabled="!currentEntity"
28
28
  @click="print"
29
- >打 印</el-button
29
+ >{{ t('common.print') }}</el-button
30
30
  >
31
31
  <el-button
32
32
  type="primary"
@@ -35,10 +35,10 @@
35
35
  size=""
36
36
  :disabled="!currentEntity"
37
37
  @click="printView"
38
- >打 预 览</el-button
38
+ >{{ t('common.printPreview') }}</el-button
39
39
  >
40
- <el-button @click="cancel">取 消</el-button>
41
- <el-button @click="downloadPrintClient">下载打印插件</el-button>
40
+ <el-button @click="cancel">{{ t('common.cancel') }}</el-button>
41
+ <el-button @click="downloadPrintClient">{{ t('common.downloadPrintClient') }}</el-button>
42
42
  </div>
43
43
  </el-dialog>
44
44
  </template>
@@ -83,7 +83,7 @@ export default class printDialog extends Vue {
83
83
  // 提交状态
84
84
  submitLoading: false,
85
85
  // 弹出层标题
86
- title: "请选择",
86
+ title: (this as any).t('common.pleaseSelect'),
87
87
  // 保存时是否自动关闭
88
88
  isCloseOnSave: true,
89
89
  // 启用多选模式
@@ -114,38 +114,38 @@ export default class printDialog extends Vue {
114
114
  },
115
115
  // 列表列信息
116
116
  listColumns: [
117
- { key: 0, text: `序号`, property: "id", visible: true },
118
- { key: 1, text: `模板编号`, property: "templateNo", visible: true },
119
- { key: 2, text: `模板名称`, property: "templateName", visible: true },
117
+ { key: 0, text: (this as any).t('common.serialNumber'), property: "id", visible: true },
118
+ { key: 1, text: (this as any).t('common.templateNo'), property: "templateNo", visible: true },
119
+ { key: 2, text: (this as any).t('common.templateName'), property: "templateName", visible: true },
120
120
  {
121
121
  key: 3,
122
- text: `模板类型`,
122
+ text: (this as any).t('common.templateType'),
123
123
  property: "templateType",
124
124
  visible: true,
125
125
  setting: { dictType: "sys_template_type" },
126
126
  },
127
127
  {
128
128
  key: 4,
129
- text: `模板内容`,
129
+ text: (this as any).t('common.templateContent'),
130
130
  property: "templateContent",
131
131
  visible: true,
132
132
  },
133
- { key: 5, text: `模板设置`, property: "setting", visible: true },
133
+ { key: 5, text: (this as any).t('common.templateSetting'), property: "setting", visible: true },
134
134
  {
135
135
  key: 6,
136
- text: `模板版本号`,
136
+ text: (this as any).t('common.templateVersion'),
137
137
  property: "templateDescribe",
138
138
  visible: true,
139
139
  },
140
140
  {
141
141
  key: 7,
142
- text: `模板描述`,
142
+ text: (this as any).t('common.templateDescription'),
143
143
  property: "templateDescribe",
144
144
  visible: true,
145
145
  },
146
146
  {
147
147
  key: 8,
148
- text: `状态`,
148
+ text: (this as any).t('common.status'),
149
149
  property: "templateStatus",
150
150
  setting: { dictType: "sys_template_status" },
151
151
  },
@@ -154,7 +154,7 @@ export default class printDialog extends Vue {
154
154
  // 列表查询条件
155
155
  searchRules: [
156
156
  {
157
- text: `模板类型`,
157
+ text: (this as any).t('common.templateType'),
158
158
  property: "templateType",
159
159
  displayType: "DropDownList",
160
160
  setting: { dictType: "sys_template_type" },
@@ -162,12 +162,12 @@ export default class printDialog extends Vue {
162
162
  },
163
163
 
164
164
  // {
165
- // text: `模板类型`,
165
+ // text: (this as any).t('common.templateType'),
166
166
  // property: "templateType",
167
167
  // visible: false,
168
168
  // value: this.templateType,
169
169
  // },
170
- { text: `模板名称`, property: "templateName" },
170
+ { text: (this as any).t('common.templateName'), property: "templateName" },
171
171
  ],
172
172
  //弹框是否显示确定 取消
173
173
  footerButton: true,
@@ -22,9 +22,9 @@
22
22
  type="primary"
23
23
  :loading="setting.submitLoading"
24
24
  @click="submitForm"
25
- >确 定</el-button
25
+ >{{ t('common.confirm') }}</el-button
26
26
  >
27
- <el-button @click="cancel">取 消</el-button>
27
+ <el-button @click="cancel">{{ t('common.cancel') }}</el-button>
28
28
  </div>
29
29
  </div>
30
30
  </template>
@@ -67,7 +67,7 @@ export default {
67
67
  name: "basic",
68
68
  visable: true,
69
69
  icon: "ion-plus-round",
70
- text: "基本信息",
70
+ text: (this as any).t('common.basicInfo'),
71
71
  type: "area",
72
72
  },
73
73
  {
@@ -116,10 +116,10 @@
116
116
  icon="el-icon-search"
117
117
  size="mini"
118
118
  @click="handleQuery"
119
- >搜索</el-button
119
+ >{{ t('common.search') }}</el-button
120
120
  >
121
121
  <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
122
- >重置</el-button
122
+ >{{ t('common.reset') }}</el-button
123
123
  >
124
124
  </el-form-item>
125
125
  </el-form>
@@ -144,7 +144,7 @@
144
144
  <el-table-column
145
145
  v-if="listSetting.isShowIndexColumn == true"
146
146
  type="index"
147
- label="序号"
147
+ :label="t('common.index')"
148
148
  width="50"
149
149
  align="center"
150
150
  >
@@ -250,7 +250,7 @@
250
250
  </template>
251
251
 
252
252
  <el-table-column
253
- label="操作"
253
+ :label="t('common.operation')"
254
254
  align="center"
255
255
  min-width="160"
256
256
  class-name="small-padding fixed-width"
@@ -9,7 +9,7 @@
9
9
  <!-- <el-table-column v-if="listSetting.isShowIndex != false" type="index" prop="index" label="序号" width="50"
10
10
  align="center">
11
11
  </el-table-column> -->
12
- <el-table-column v-if="listSetting.isShowIndexColumn != false" type="index" prop="index" label="序号" width="50"
12
+ <el-table-column v-if="listSetting.isShowIndexColumn != false" type="index" prop="index" :label="t('common.index')" width="50"
13
13
  align="center">
14
14
  <template scope="scope">
15
15
  <span>{{
@@ -202,7 +202,7 @@
202
202
  </el-table-column>
203
203
  </template>
204
204
 
205
- <el-table-column label="操作" align="center" min-width="160" class-name="small-padding fixed-width"
205
+ <el-table-column :label="t('common.operation')" align="center" min-width="160" class-name="small-padding fixed-width"
206
206
  v-if="listSetting.isShowOpColumn">
207
207
  <template slot-scope="scope">
208
208
  <el-button v-for="(opMenu, index) in listCustomOpMenus" :key="index" size="mini" type="text" :icon="opMenu.icon"
@@ -478,7 +478,7 @@ export default class table extends Vue {
478
478
  }
479
479
  /** 自定义列显示格式方法 */
480
480
  remarkFormat(data, column) {
481
- return data.remark ? "有备注" : "无备注";
481
+ return data.remark ? (this as any).t('common.hasRemark') : (this as any).t('common.noRemark');
482
482
  }
483
483
  /** 自定义列点击方法 */
484
484
  onFilePriview(data, column) {
@@ -486,7 +486,7 @@ export default class table extends Vue {
486
486
  }
487
487
  /** 自定义列显示Html */
488
488
  getFilePriviewLink(data, column) {
489
- return `<a href="${getFilePriviewUrl(data.remark)}" target="_blank">${data.remark ? "自定义预览" : ""
489
+ return `<a href="${getFilePriviewUrl(data.remark)}" target="_blank">${data.remark ? (this as any).t('common.customPreview') : ""
490
490
  }</a>`;
491
491
  }
492
492
  //列表点击属性字段点击
@@ -513,7 +513,7 @@ export default class table extends Vue {
513
513
  });
514
514
  columns.forEach((column, index) => {
515
515
  if (index === 0) {
516
- sums[index] = "合计";
516
+ sums[index] = (this as any).t('common.total');
517
517
  return;
518
518
  }
519
519
  if (sumColumns.indexOf(column.property) < 0) {
@@ -27,7 +27,7 @@
27
27
  </el-form-item>
28
28
  <!-- 字数统计显示:仅当 showWordCount 为 true 时显示 -->
29
29
  <div v-if="column.showWordCount" class="word-count">
30
- {{ currentLength }} / {{ column.maxLength || '不限' }}
30
+ {{ currentLength }} / {{ column.maxLength || t('common.noLimit') }}
31
31
  </div>
32
32
  </div>
33
33
  </template>
@@ -74,7 +74,7 @@
74
74
  :options="data"
75
75
  @input="updateValue"
76
76
  :normalizer="normalizer"
77
- placeholder="请选择"
77
+ :placeholder="t('common.pleaseSelect')"
78
78
  />
79
79
  </el-form-item>
80
80
  </template>
@@ -352,7 +352,7 @@ export default class upload extends Vue {
352
352
  }
353
353
  return;
354
354
  }
355
- (this as any).$message.success("上传成功");
355
+ (this as any).$message.success((this as any).t('common.uploadSuccess'));
356
356
  this.fileList.push({
357
357
  name: res.data.materialNick,
358
358
  url: res.data.materialUrl,
@@ -11,7 +11,7 @@
11
11
  :before-upload="handleBeforeUpload" :data="{ folderId: '0' }" :limit="limit" :on-error="handleUploadError"
12
12
  :on-exceed="handleExceed" :on-success="handleUploadSuccess" :headers="headers" :on-progress='handleProgress'
13
13
  ref="upload" :on-remove="handleRemove" multiple :file-list="fileList">
14
- <el-button size="small" type="primary">点击上传</el-button>
14
+ <el-button size="small" type="primary">{{ t('common.clickToUpload') }}</el-button>
15
15
  </el-upload>
16
16
  <el-dialog :visible.sync="dialogVisible">
17
17
  <img width="100%" :src="dialogImageUrl" alt="">
@@ -35,7 +35,7 @@
35
35
  :underline="false"
36
36
  @click="handleDelete(index)"
37
37
  type="danger"
38
- >删除</el-link
38
+ >{{ t('common.delete') }}</el-link
39
39
  >
40
40
  </div>
41
41
  </li>
@@ -205,7 +205,7 @@ export default class upload extends Vue {
205
205
  });
206
206
  if (!isTypeOk) {
207
207
  (this as any).$message.error(
208
- `文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`
208
+ (this as any).t('common.incorrectFileFormat').replace('{fileType}', this.fileType.join("/"))
209
209
  );
210
210
  return false;
211
211
  }
@@ -215,7 +215,7 @@ export default class upload extends Vue {
215
215
  const isLt = file.size / 1024 / 1024 < this.fileSize;
216
216
  if (!isLt) {
217
217
  (this as any).$message.error(
218
- `上传文件大小不能超过 ${this.fileSize} MB!`
218
+ (this as any).t('common.fileSizeExceeded').replace('{fileSize}', this.fileSize)
219
219
  );
220
220
  return false;
221
221
  }
@@ -224,12 +224,12 @@ export default class upload extends Vue {
224
224
  }
225
225
  // 文件个数超出
226
226
  public handleExceed() {
227
- (this as any).$message.error(`上传文件数量不能超过 ${this.limit} 个!`);
227
+ (this as any).$message.error((this as any).t('common.fileCountExceeded').replace('{limit}', this.limit));
228
228
  }
229
229
  // 上传失败
230
230
  public handleUploadError(err) {
231
231
 
232
- (this as any).$message.error("上传失败, 请重试");
232
+ (this as any).$message.error((this as any).t('common.uploadFailed'));
233
233
 
234
234
  }
235
235
  // 上传成功回调
@@ -258,7 +258,7 @@ export default class upload extends Vue {
258
258
  }
259
259
  return
260
260
  }
261
- (this as any).$message.success("上传成功")
261
+ (this as any).$message.success((this as any).t('common.uploadSuccess'))
262
262
  this.fileList.push({
263
263
  name: file.name,
264
264
  url: res.data.materialUrl,
@@ -87,7 +87,7 @@ export default class uploadDialog extends Vue {
87
87
  this.setting.open = false;
88
88
  this.setting.isUploading = false;
89
89
  (this.$refs.setting as any).clearFiles();
90
- (this as any).$alert(response.msg, "导入结果", {
90
+ (this as any).$alert(response.msg, (this as any).t('common.importResult'), {
91
91
  dangerouslyUseHTMLString: true,
92
92
  });
93
93
  this.$emit("onImportSuccess", null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kz-ui-base",
3
- "version": "1.0.158",
3
+ "version": "1.0.159",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {