vxe-table 4.7.63 → 4.7.65

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.
Files changed (74) hide show
  1. package/es/locale/lang/en-US.js +13 -7
  2. package/es/locale/lang/es-ES.js +13 -7
  3. package/es/locale/lang/hu-HU.js +621 -0
  4. package/es/locale/lang/ja-JP.js +13 -7
  5. package/es/locale/lang/ko-KR.js +631 -0
  6. package/es/locale/lang/pt-BR.js +13 -7
  7. package/es/locale/lang/ru-RU.js +631 -0
  8. package/es/locale/lang/vi-VN.js +631 -0
  9. package/es/locale/lang/zh-CN.js +13 -7
  10. package/es/locale/lang/zh-TC.js +71 -65
  11. package/es/style.css +1 -1
  12. package/es/table/src/table.js +20 -8
  13. package/es/ui/index.js +6 -4
  14. package/es/ui/src/log.js +1 -1
  15. package/lib/index.umd.js +41 -18
  16. package/lib/index.umd.min.js +1 -1
  17. package/lib/locale/lang/en-US.js +13 -7
  18. package/lib/locale/lang/en-US.min.js +1 -1
  19. package/lib/locale/lang/en-US.umd.js +13 -7
  20. package/lib/locale/lang/es-ES.js +13 -7
  21. package/lib/locale/lang/es-ES.min.js +1 -1
  22. package/lib/locale/lang/es-ES.umd.js +13 -7
  23. package/lib/locale/lang/hu-HU.js +627 -0
  24. package/lib/locale/lang/hu-HU.min.js +1 -0
  25. package/lib/locale/lang/ja-JP.js +13 -7
  26. package/lib/locale/lang/ja-JP.min.js +1 -1
  27. package/lib/locale/lang/ja-JP.umd.js +13 -7
  28. package/lib/locale/lang/ko-KR.js +637 -0
  29. package/lib/locale/lang/ko-KR.min.js +1 -0
  30. package/lib/locale/lang/pt-BR.js +13 -7
  31. package/lib/locale/lang/pt-BR.min.js +1 -1
  32. package/lib/locale/lang/pt-BR.umd.js +13 -7
  33. package/lib/locale/lang/ru-RU.js +637 -0
  34. package/lib/locale/lang/ru-RU.min.js +1 -0
  35. package/lib/locale/lang/vi-VN.js +637 -0
  36. package/lib/locale/lang/vi-VN.min.js +1 -0
  37. package/lib/locale/lang/zh-CN.js +13 -7
  38. package/lib/locale/lang/zh-CN.min.js +1 -1
  39. package/lib/locale/lang/zh-CN.umd.js +13 -7
  40. package/lib/locale/lang/zh-HK.min.js +1 -1
  41. package/lib/locale/lang/zh-HK.umd.js +71 -65
  42. package/lib/locale/lang/zh-MO.min.js +1 -1
  43. package/lib/locale/lang/zh-MO.umd.js +71 -65
  44. package/lib/locale/lang/zh-TC.js +71 -65
  45. package/lib/locale/lang/zh-TC.min.js +1 -1
  46. package/lib/locale/lang/zh-TC.umd.js +71 -65
  47. package/lib/locale/lang/zh-TW.min.js +1 -1
  48. package/lib/locale/lang/zh-TW.umd.js +71 -65
  49. package/lib/style.css +1 -1
  50. package/lib/table/src/table.js +21 -6
  51. package/lib/table/src/table.min.js +1 -1
  52. package/lib/ui/index.js +10 -8
  53. package/lib/ui/index.min.js +1 -1
  54. package/lib/ui/src/log.js +1 -1
  55. package/lib/ui/src/log.min.js +1 -1
  56. package/package.json +2 -2
  57. package/packages/locale/lang/en-US.ts +13 -7
  58. package/packages/locale/lang/es-ES.ts +13 -7
  59. package/packages/locale/lang/hu-HU.ts +623 -0
  60. package/packages/locale/lang/ja-JP.ts +13 -7
  61. package/packages/locale/lang/ko-KR.ts +633 -0
  62. package/packages/locale/lang/pt-BR.ts +13 -7
  63. package/packages/locale/lang/ru-RU.ts +633 -0
  64. package/packages/locale/lang/vi-VN.ts +633 -0
  65. package/packages/locale/lang/zh-CN.ts +13 -7
  66. package/packages/locale/lang/zh-TC.ts +71 -65
  67. package/packages/table/src/table.ts +19 -8
  68. package/packages/ui/index.ts +4 -3
  69. /package/es/{iconfont.1723112033726.ttf → iconfont.1723521776225.ttf} +0 -0
  70. /package/es/{iconfont.1723112033726.woff → iconfont.1723521776225.woff} +0 -0
  71. /package/es/{iconfont.1723112033726.woff2 → iconfont.1723521776225.woff2} +0 -0
  72. /package/lib/{iconfont.1723112033726.ttf → iconfont.1723521776225.ttf} +0 -0
  73. /package/lib/{iconfont.1723112033726.woff → iconfont.1723521776225.woff} +0 -0
  74. /package/lib/{iconfont.1723112033726.woff2 → iconfont.1723521776225.woff2} +0 -0
@@ -1,7 +1,3 @@
1
- /**
2
- * 已废弃
3
- * @deprecated
4
- */
5
1
  export default {
6
2
  vxe: {
7
3
  base: {
@@ -23,7 +19,7 @@ export default {
23
19
  useErr: '安裝 "{0}" 模組時發生錯誤,可能順序不正確,依賴的模組需要在Table之前安裝',
24
20
  barUnableLink: '工具欄無法關聯表格',
25
21
  expandContent: '展開行的插槽應該是 “content”,請檢查是否正確',
26
- reqComp: '缺少 "{0}" 組件,请检查是否正确安装',
22
+ reqComp: '缺少 "{0}" 組件,请检查是否正确安装。 https://vxeui.com/#/start/useGlobal',
27
23
  reqModule: '缺少 "{0}" 模組',
28
24
  reqProp: '缺少必要的 "{0}" 參數,可能會導致出現錯誤',
29
25
  emptyProp: '參數 "{0}" 不允許為空',
@@ -53,6 +49,7 @@ export default {
53
49
  emptyText: '暫無資料',
54
50
  allTitle: '全選/取消',
55
51
  seqTitle: '序号',
52
+ actionTitle: '操作',
56
53
  confirmFilter: '篩選',
57
54
  resetFilter: '重置',
58
55
  allFilter: '全部',
@@ -310,25 +307,25 @@ export default {
310
307
  uploadSuccess: '上传成功'
311
308
  },
312
309
  formDesign: {
313
- formName: '表单名称',
314
- defFormTitle: '未命名的表单',
315
- widgetPropTab: '控件属性',
316
- widgetFormTab: '表单属性',
310
+ formName: '表單名稱',
311
+ defFormTitle: '未命名的表單',
312
+ widgetPropTab: '控件屬性',
313
+ widgetFormTab: '表單屬性',
317
314
  styleSetting: {
318
- btn: '样式设置',
319
- title: '表单的样式设置',
320
- layoutTitle: '控件布局',
321
- verticalLayout: '上下布局',
322
- horizontalLayout: '横向布局',
323
- styleTitle: '标题样式',
324
- boldTitle: '标题加粗',
315
+ btn: '樣式設置',
316
+ title: '表單的樣式設置',
317
+ layoutTitle: '控件佈局',
318
+ verticalLayout: '上下佈局',
319
+ horizontalLayout: '橫向佈局',
320
+ styleTitle: '標題樣式',
321
+ boldTitle: '標題加粗',
325
322
  fontBold: '加粗',
326
- fontNormal: '常规',
327
- colonTitle: '显示冒号',
328
- colonVisible: '显示',
329
- colonHidden: '隐藏',
330
- alignTitle: '对齐方式',
331
- widthTitle: '标题宽度',
323
+ fontNormal: '常規',
324
+ colonTitle: '顯示冒號',
325
+ colonVisible: '顯示',
326
+ colonHidden: '隱藏',
327
+ alignTitle: '對齊方式',
328
+ widthTitle: '標題寬度',
332
329
  alignLeft: '居左',
333
330
  alignRight: '居右',
334
331
  unitPx: '像素',
@@ -342,87 +339,96 @@ export default {
342
339
  },
343
340
  copyTitle: '副本_{0}',
344
341
  component: {
345
- input: '输入框',
342
+ input: '輸入框',
346
343
  textarea: '文本域',
347
- select: '下拉选择',
344
+ select: '下拉選擇',
348
345
  row: '一行多列',
349
- title: '文本',
346
+ title: '標題',
347
+ text: '文本',
350
348
  subtable: '子表',
351
349
  VxeSwitch: '是/否',
352
- VxeInput: '输入框',
353
- VxeNumberInput: '数字',
350
+ VxeInput: '輸入框',
351
+ VxeNumberInput: '數字',
354
352
  VxeDatePicker: '日期',
355
353
  VxeTextarea: '文本域',
356
- VxeSelect: '下拉选择',
357
- VxeTreeSelect: '树形选择',
358
- VxeRadioGroup: '单选框',
359
- VxeCheckboxGroup: '复选框',
354
+ VxeSelect: '下拉選擇',
355
+ VxeTreeSelect: '樹形選擇',
356
+ VxeRadioGroup: '單選框',
357
+ VxeCheckboxGroup: '複選框',
360
358
  VxeUploadFile: '文件',
361
- VxeUploadImage: '图片'
359
+ VxeUploadImage: '圖片'
362
360
  }
363
361
  },
364
362
  widgetProp: {
365
- name: '控件名称',
363
+ name: '控件名稱',
366
364
  placeholder: '控件提示',
367
- required: '必填校验',
368
- multiple: '允许多选',
365
+ required: '必填校驗',
366
+ multiple: '允許多選',
369
367
  displaySetting: {
370
- name: '显示设置',
371
- pc: '电脑端',
372
- mobile: '手机端',
373
- visible: '显示',
374
- hidden: '隐藏'
368
+ name: '顯示設置',
369
+ pc: '電腦端',
370
+ mobile: '手機端',
371
+ visible: '顯示',
372
+ hidden: '隱藏'
375
373
  },
376
374
  dataSource: {
377
- name: '数据源',
378
- defValue: '选项{0}',
379
- addOption: '添加选项',
380
- batchEditOption: '批量编辑',
381
- batchEditTip: '每行对应一个选项,支持从表格、Excel、WPS 中直接复制粘贴。',
382
- batchEditSubTip: '每行对应一个选项,如果是分组,子项可以是空格或制表键开头,支持从表格、Excel、WPS 中直接复制粘贴。',
383
- buildOption: '生成选项'
375
+ name: '數據源',
376
+ defValue: '選項{0}',
377
+ addOption: '添加選項',
378
+ batchEditOption: '批量編輯',
379
+ batchEditTip: '每行對應一個選項,支持從表格、Excel、WPS 中直接複製粘貼。',
380
+ batchEditSubTip: '每行對應一個選項,如果是分組,子項可以是空格或製表鍵開頭,支持從表格、Excel、WPS 中直接複製粘貼。',
381
+ buildOption: '生成選項'
384
382
  },
385
383
  rowProp: {
386
- colSize: '列数',
384
+ colSize: '列數',
387
385
  col2: '两列',
388
386
  col3: '三列',
389
387
  col4: '四列',
390
388
  col6: '六列',
391
- layout: '布局'
389
+ layout: '佈局'
392
390
  },
393
391
  textProp: {
394
392
  name: '内容',
395
- alignTitle: '对齐方式',
393
+ alignTitle: '對齊方式',
396
394
  alignLeft: '居左',
397
395
  alignCenter: '居中',
398
396
  alignRight: '居右',
399
- colorTitle: '字体颜色',
400
- sizeTitle: '字体大小',
401
- boldTitle: '字体加粗',
402
- fontNormal: '常规',
397
+ colorTitle: '字體顏色',
398
+ sizeTitle: '字體大小',
399
+ boldTitle: '字體加粗',
400
+ fontNormal: '常規',
403
401
  fontBold: '加粗'
404
402
  },
405
403
  subtableProp: {
406
- seqTitle: '序号',
407
- showSeq: '显示序号',
408
- showCheckbox: '允许多选',
409
- errSubDrag: '子表不支持该控件,请使用其他控件'
404
+ seqTitle: '序號',
405
+ showSeq: '顯示序號',
406
+ showCheckbox: '允許多選',
407
+ errSubDrag: '子表不支持該控件,請使用其他控件'
410
408
  },
411
409
  uploadProp: {
412
410
  uploadProp: {
413
- limitFileCount: '文件数量限制',
411
+ limitFileCount: '文件數量限制',
414
412
  limitFileSize: '文件大小限制',
415
- multiFile: '允许上传多个文件',
416
- limitImgCount: '图片数量限制',
417
- limitImgSize: '图片大小限制',
418
- multiImg: '允许上传多张图片'
413
+ multiFile: '允許上傳多個文件',
414
+ limitImgCount: '圖片數量限制',
415
+ limitImgSize: '圖片大小限制',
416
+ multiImg: '允許上傳多張圖片'
419
417
  }
420
418
  }
421
419
  }
422
420
  },
423
421
  listDesign: {
424
- fieldSettingTab: '字段设置',
425
- listSettingTab: '列表设置'
422
+ fieldSettingTab: '字段設置',
423
+ listSettingTab: '列表設置',
424
+ activeBtn: {
425
+ ActionButtonUpdate: '編輯',
426
+ ActionButtonDelete: '刪除'
427
+ }
428
+ },
429
+ text: {
430
+ copySuccess: '已複製到剪貼板',
431
+ copyError: '當前環境不支持該操作'
426
432
  },
427
433
 
428
434
  /**
@@ -154,6 +154,7 @@ export default defineComponent({
154
154
  resizeList: [],
155
155
  pxList: [],
156
156
  pxMinList: [],
157
+ autoMinList: [],
157
158
  scaleList: [],
158
159
  scaleMinList: [],
159
160
  autoList: [],
@@ -552,7 +553,8 @@ export default defineComponent({
552
553
 
553
554
  const computeAutoWidthColumnList = computed(() => {
554
555
  const { visibleColumn } = internalData
555
- return visibleColumn.filter(column => column.width === 'auto')
556
+ const { tableColumn } = reactData
557
+ return tableColumn.length || visibleColumn.length ? visibleColumn.filter(column => column.width === 'auto' || column.minWidth === 'auto') : []
556
558
  })
557
559
 
558
560
  const computeFixedColumnSize = computed(() => {
@@ -1123,11 +1125,11 @@ export default defineComponent({
1123
1125
  const cellStyle = getComputedStyle(firstCellEl)
1124
1126
  paddingSize = Math.floor(XEUtils.toNumber(cellStyle.paddingLeft) + XEUtils.toNumber(cellStyle.paddingRight)) + 2
1125
1127
  }
1126
- let colWidth = column.renderAutoWidth - paddingSize + 2
1128
+ let colWidth = column.renderAutoWidth - paddingSize
1127
1129
  XEUtils.arrayEach(cellElList, (cellEl) => {
1128
1130
  const labelEl = cellEl.firstChild as HTMLElement
1129
1131
  if (labelEl) {
1130
- colWidth = Math.max(colWidth, labelEl.offsetWidth)
1132
+ colWidth = Math.max(colWidth, Math.ceil(labelEl.offsetWidth) + 4)
1131
1133
  }
1132
1134
  })
1133
1135
  column.renderAutoWidth = colWidth + paddingSize
@@ -1161,13 +1163,19 @@ export default defineComponent({
1161
1163
  let meanWidth = remainWidth / 100
1162
1164
  const { fit } = props
1163
1165
  const { columnStore } = reactData
1164
- const { resizeList, pxMinList, pxList, scaleList, scaleMinList, autoList, remainList } = columnStore
1166
+ const { resizeList, pxMinList, autoMinList, pxList, scaleList, scaleMinList, autoList, remainList } = columnStore
1165
1167
  // 最小宽
1166
1168
  pxMinList.forEach((column) => {
1167
1169
  const minWidth = XEUtils.toInteger(column.minWidth)
1168
1170
  tableWidth += minWidth
1169
1171
  column.renderWidth = minWidth
1170
1172
  })
1173
+ // 最小自适应
1174
+ autoMinList.forEach((column) => {
1175
+ const scaleWidth = Math.max(60, XEUtils.toInteger(column.renderAutoWidth))
1176
+ tableWidth += scaleWidth
1177
+ column.renderWidth = scaleWidth
1178
+ })
1171
1179
  // 最小百分比
1172
1180
  scaleMinList.forEach((column) => {
1173
1181
  const scaleWidth = Math.floor(XEUtils.toInteger(column.minWidth) * meanWidth)
@@ -1199,10 +1207,10 @@ export default defineComponent({
1199
1207
  column.renderWidth = width
1200
1208
  })
1201
1209
  remainWidth -= tableWidth
1202
- meanWidth = remainWidth > 0 ? Math.floor(remainWidth / (scaleMinList.length + pxMinList.length + remainList.length)) : 0
1210
+ meanWidth = remainWidth > 0 ? Math.floor(remainWidth / (scaleMinList.length + pxMinList.length + autoMinList.length + remainList.length)) : 0
1203
1211
  if (fit) {
1204
1212
  if (remainWidth > 0) {
1205
- scaleMinList.concat(pxMinList).forEach((column) => {
1213
+ scaleMinList.concat(pxMinList).concat(autoMinList).forEach((column) => {
1206
1214
  tableWidth += meanWidth
1207
1215
  column.renderWidth += meanWidth
1208
1216
  })
@@ -1221,7 +1229,7 @@ export default defineComponent({
1221
1229
  * 偏移量算法
1222
1230
  * 如果所有列足够放的情况下,从最后动态列开始分配
1223
1231
  */
1224
- const dynamicList = scaleList.concat(scaleMinList).concat(pxMinList).concat(remainList)
1232
+ const dynamicList = scaleList.concat(scaleMinList).concat(pxMinList).concat(autoMinList).concat(remainList)
1225
1233
  let dynamicSize = dynamicList.length - 1
1226
1234
  if (dynamicSize > 0) {
1227
1235
  let odiffer = bodyWidth - tableWidth
@@ -5484,6 +5492,7 @@ export default defineComponent({
5484
5492
  const resizeList: VxeTableDefines.ColumnInfo[] = []
5485
5493
  const pxList: VxeTableDefines.ColumnInfo[] = []
5486
5494
  const pxMinList: VxeTableDefines.ColumnInfo[] = []
5495
+ const autoMinList: VxeTableDefines.ColumnInfo[] = []
5487
5496
  const scaleList: VxeTableDefines.ColumnInfo[] = []
5488
5497
  const scaleMinList: VxeTableDefines.ColumnInfo[] = []
5489
5498
  const autoList: VxeTableDefines.ColumnInfo[] = []
@@ -5506,6 +5515,8 @@ export default defineComponent({
5506
5515
  scaleList.push(column)
5507
5516
  } else if (isPx(column.minWidth)) {
5508
5517
  pxMinList.push(column)
5518
+ } else if (column.minWidth === 'auto') {
5519
+ autoMinList.push(column)
5509
5520
  } else if (isScale(column.minWidth)) {
5510
5521
  scaleMinList.push(column)
5511
5522
  } else {
@@ -5513,7 +5524,7 @@ export default defineComponent({
5513
5524
  }
5514
5525
  }
5515
5526
  })
5516
- Object.assign(reactData.columnStore, { resizeList, pxList, pxMinList, scaleList, scaleMinList, autoList, remainList })
5527
+ Object.assign(reactData.columnStore, { resizeList, pxList, pxMinList, autoMinList, scaleList, scaleMinList, autoList, remainList })
5517
5528
  },
5518
5529
  saveCustomStore (type) {
5519
5530
  const tableId = computeTableId.value
@@ -280,6 +280,7 @@ export const use = VxeUI.use
280
280
  export const setup = (options?: VxeGlobalConfig) => {
281
281
  return VxeUI.setConfig(options)
282
282
  }
283
+ VxeUI.setup = setup
283
284
  /**
284
285
  * 已废弃
285
286
  * @deprecated
@@ -287,6 +288,7 @@ export const setup = (options?: VxeGlobalConfig) => {
287
288
  export const config = (options?: VxeGlobalConfig) => {
288
289
  return VxeUI.setConfig(options)
289
290
  }
291
+ VxeUI.config = config
290
292
  /**
291
293
  * 已废弃
292
294
  * @deprecated
@@ -294,6 +296,7 @@ export const config = (options?: VxeGlobalConfig) => {
294
296
  export const t = (key: string, args?: any) => {
295
297
  return VxeUI.getI18n(key, args)
296
298
  }
299
+ VxeUI.t = t
297
300
  /**
298
301
  * 已废弃
299
302
  * @deprecated
@@ -301,6 +304,7 @@ export const t = (key: string, args?: any) => {
301
304
  export const _t = (content: string | number | boolean | null | undefined, args?: any) => {
302
305
  return getFuncText(content, args)
303
306
  }
307
+ VxeUI._t = _t
304
308
 
305
309
  /**
306
310
  * 已废弃,兼容老版本
@@ -308,9 +312,6 @@ export const _t = (content: string | number | boolean | null | undefined, args?:
308
312
  */
309
313
  export const VXETable = VxeUI
310
314
 
311
- VXETable.setup = config
312
- VXETable.config = config
313
-
314
315
  /**
315
316
  * 已废弃,兼容老版本
316
317
  * @deprecated