vxe-table 4.7.85 → 4.7.87

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 (36) hide show
  1. package/README.md +63 -21
  2. package/es/grid/src/grid.js +4 -4
  3. package/es/locale/lang/en-US.js +4 -1
  4. package/es/style.css +1 -1
  5. package/es/table/module/export/import-panel.js +1 -1
  6. package/es/table/src/table.js +43 -37
  7. package/es/ui/index.js +2 -2
  8. package/es/ui/src/log.js +1 -1
  9. package/lib/grid/src/grid.js +4 -4
  10. package/lib/grid/src/grid.min.js +1 -1
  11. package/lib/index.umd.js +66 -56
  12. package/lib/index.umd.min.js +1 -1
  13. package/lib/locale/lang/en-US.js +4 -1
  14. package/lib/locale/lang/en-US.min.js +1 -1
  15. package/lib/locale/lang/en-US.umd.js +4 -1
  16. package/lib/style.css +1 -1
  17. package/lib/table/module/export/import-panel.js +1 -1
  18. package/lib/table/module/export/import-panel.min.js +1 -1
  19. package/lib/table/src/table.js +53 -48
  20. package/lib/table/src/table.min.js +1 -1
  21. package/lib/ui/index.js +2 -2
  22. package/lib/ui/index.min.js +1 -1
  23. package/lib/ui/src/log.js +1 -1
  24. package/lib/ui/src/log.min.js +1 -1
  25. package/package.json +2 -2
  26. package/packages/grid/src/grid.ts +4 -4
  27. package/packages/locale/lang/en-US.ts +4 -1
  28. package/packages/table/module/export/import-panel.ts +1 -1
  29. package/packages/table/src/table.ts +43 -37
  30. package/types/all.d.ts +1 -0
  31. /package/es/{iconfont.1727599604340.ttf → iconfont.1728483552005.ttf} +0 -0
  32. /package/es/{iconfont.1727599604340.woff → iconfont.1728483552005.woff} +0 -0
  33. /package/es/{iconfont.1727599604340.woff2 → iconfont.1728483552005.woff2} +0 -0
  34. /package/lib/{iconfont.1727599604340.ttf → iconfont.1728483552005.ttf} +0 -0
  35. /package/lib/{iconfont.1727599604340.woff → iconfont.1728483552005.woff} +0 -0
  36. /package/lib/{iconfont.1727599604340.woff2 → iconfont.1728483552005.woff2} +0 -0
package/lib/ui/src/log.js CHANGED
@@ -8,6 +8,6 @@ var _core = require("@vxe-ui/core");
8
8
  const {
9
9
  log
10
10
  } = _core.VxeUI;
11
- const version = `table v${"4.7.85"}`;
11
+ const version = `table v${"4.7.87"}`;
12
12
  const warnLog = exports.warnLog = log.create('warn', version);
13
13
  const errLog = exports.errLog = log.create('error', version);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");const log=_core.VxeUI["log"],version="table v4.7.85",warnLog=exports.warnLog=log.create("warn",version),errLog=exports.errLog=log.create("error",version);
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");const log=_core.VxeUI["log"],version="table v4.7.87",warnLog=exports.warnLog=log.create("warn",version),errLog=exports.errLog=log.create("error",version);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vxe-table",
3
- "version": "4.7.85",
3
+ "version": "4.7.87",
4
4
  "description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、列拖拽,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
5
5
  "scripts": {
6
6
  "update": "npm install --legacy-peer-deps",
@@ -28,7 +28,7 @@
28
28
  "style": "lib/style.css",
29
29
  "typings": "types/index.d.ts",
30
30
  "dependencies": {
31
- "vxe-pc-ui": "^4.2.10"
31
+ "vxe-pc-ui": "^4.2.19"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/resize-observer-browser": "^0.1.11",
@@ -130,19 +130,19 @@ export default defineComponent({
130
130
  })
131
131
 
132
132
  const computePagerOpts = computed(() => {
133
- return Object.assign({}, XEUtils.clone(getConfig().grid.pagerConfig, true), props.pagerConfig) as VxeGridPropTypes.PagerConfig
133
+ return Object.assign({}, getConfig().grid.pagerConfig, props.pagerConfig) as VxeGridPropTypes.PagerConfig
134
134
  })
135
135
 
136
136
  const computeFormOpts = computed(() => {
137
- return Object.assign({}, XEUtils.clone(getConfig().grid.formConfig, true), props.formConfig) as VxeGridPropTypes.FormOpts
137
+ return Object.assign({}, getConfig().grid.formConfig, props.formConfig) as VxeGridPropTypes.FormOpts
138
138
  })
139
139
 
140
140
  const computeToolbarOpts = computed(() => {
141
- return Object.assign({}, XEUtils.clone(getConfig().grid.toolbarConfig, true), props.toolbarConfig) as VxeGridPropTypes.ToolbarOpts
141
+ return Object.assign({}, getConfig().grid.toolbarConfig, props.toolbarConfig) as VxeGridPropTypes.ToolbarOpts
142
142
  })
143
143
 
144
144
  const computeZoomOpts = computed(() => {
145
- return Object.assign({}, XEUtils.clone(getConfig().grid.zoomConfig, true), props.zoomConfig)
145
+ return Object.assign({}, getConfig().grid.zoomConfig, props.zoomConfig)
146
146
  })
147
147
 
148
148
  const computeStyles = computed(() => {
@@ -89,7 +89,7 @@ export default {
89
89
  goto: 'Go to',
90
90
  gotoTitle: 'Number',
91
91
  pagesize: '{0}/page',
92
- total: 'Total {0} record',
92
+ total: 'Total {0} records',
93
93
  pageClassifier: '',
94
94
  homePage: 'Home',
95
95
  homePageTitle: 'Home page',
@@ -320,6 +320,9 @@ export default {
320
320
  fileTitle: 'Upload file'
321
321
  }
322
322
  },
323
+ empty: {
324
+ defText: 'No Data'
325
+ },
323
326
  formDesign: {
324
327
  formName: 'Form name',
325
328
  defFormTitle: 'Unnamed form',
@@ -102,7 +102,7 @@ export default defineComponent({
102
102
  modelValue: storeData.visible,
103
103
  title: getI18n('vxe.import.impTitle'),
104
104
  className: 'vxe-table-import-popup-wrapper',
105
- width: 520,
105
+ width: 540,
106
106
  mask: true,
107
107
  lockView: true,
108
108
  showFooter: false,
@@ -382,15 +382,15 @@ export default defineComponent({
382
382
  })
383
383
 
384
384
  const computeValidOpts = computed(() => {
385
- return Object.assign({}, XEUtils.clone(getConfig().table.validConfig, true), props.validConfig) as VxeTablePropTypes.ValidOpts
385
+ return Object.assign({}, getConfig().table.validConfig, props.validConfig) as VxeTablePropTypes.ValidOpts
386
386
  })
387
387
 
388
388
  const computeSXOpts = computed(() => {
389
- return Object.assign({}, XEUtils.clone(getConfig().table.scrollX, true), props.scrollX) as VxeTablePropTypes.SXOpts
389
+ return Object.assign({}, getConfig().table.scrollX, props.scrollX) as VxeTablePropTypes.SXOpts
390
390
  })
391
391
 
392
392
  const computeSYOpts = computed(() => {
393
- return Object.assign({}, XEUtils.clone(getConfig().table.scrollY, true), props.scrollY) as VxeTablePropTypes.SYOpts
393
+ return Object.assign({}, getConfig().table.scrollY, props.scrollY) as VxeTablePropTypes.SYOpts
394
394
  })
395
395
 
396
396
  const computeRowHeightMaps = computed(() => {
@@ -403,37 +403,37 @@ export default defineComponent({
403
403
  })
404
404
 
405
405
  const computeColumnOpts = computed(() => {
406
- return Object.assign({}, XEUtils.clone(getConfig().table.columnConfig, true), props.columnConfig) as VxeTablePropTypes.ColumnOpts
406
+ return Object.assign({}, getConfig().table.columnConfig, props.columnConfig) as VxeTablePropTypes.ColumnOpts
407
407
  })
408
408
 
409
409
  const computeRowOpts = computed(() => {
410
- return Object.assign({}, XEUtils.clone(getConfig().table.rowConfig, true), props.rowConfig) as VxeTablePropTypes.RowOpts
410
+ return Object.assign({}, getConfig().table.rowConfig, props.rowConfig) as VxeTablePropTypes.RowOpts
411
411
  })
412
412
 
413
413
  const computeResizeOpts = computed(() => {
414
- return Object.assign({}, XEUtils.clone(getConfig().table.resizeConfig, true), props.resizeConfig) as VxeTablePropTypes.ResizeOpts
414
+ return Object.assign({}, getConfig().table.resizeConfig, props.resizeConfig) as VxeTablePropTypes.ResizeOpts
415
415
  })
416
416
 
417
417
  const computeResizableOpts = computed(() => {
418
- return Object.assign({}, XEUtils.clone(getConfig().table.resizableConfig, true), props.resizableConfig) as VxeTablePropTypes.ResizableOpts
418
+ return Object.assign({}, getConfig().table.resizableConfig, props.resizableConfig) as VxeTablePropTypes.ResizableOpts
419
419
  })
420
420
 
421
421
  const computeSeqOpts = computed(() => {
422
- return Object.assign({ startIndex: 0 }, XEUtils.clone(getConfig().table.seqConfig, true), props.seqConfig) as VxeTablePropTypes.SeqOpts
422
+ return Object.assign({ startIndex: 0 }, getConfig().table.seqConfig, props.seqConfig) as VxeTablePropTypes.SeqOpts
423
423
  })
424
424
 
425
425
  const computeRadioOpts = computed(() => {
426
- return Object.assign({}, XEUtils.clone(getConfig().table.radioConfig, true), props.radioConfig) as VxeTablePropTypes.RadioOpts
426
+ return Object.assign({}, getConfig().table.radioConfig, props.radioConfig) as VxeTablePropTypes.RadioOpts
427
427
  })
428
428
 
429
429
  const computeCheckboxOpts = computed(() => {
430
- return Object.assign({}, XEUtils.clone(getConfig().table.checkboxConfig, true), props.checkboxConfig) as VxeTablePropTypes.CheckboxOpts
430
+ return Object.assign({}, getConfig().table.checkboxConfig, props.checkboxConfig) as VxeTablePropTypes.CheckboxOpts
431
431
  })
432
432
 
433
433
  let computeTooltipOpts = ref() as ComputedRef<VxeTablePropTypes.TooltipOpts>
434
434
 
435
435
  computeTooltipOpts = computed(() => {
436
- return Object.assign({}, XEUtils.clone(getConfig().tooltip, true), XEUtils.clone(getConfig().table.tooltipConfig, true), props.tooltipConfig)
436
+ return Object.assign({}, getConfig().tooltip, getConfig().table.tooltipConfig, props.tooltipConfig)
437
437
  })
438
438
 
439
439
  const computeTipConfig = computed(() => {
@@ -449,39 +449,39 @@ export default defineComponent({
449
449
  })
450
450
 
451
451
  const computeEditOpts = computed(() => {
452
- return Object.assign({}, XEUtils.clone(getConfig().table.editConfig, true), props.editConfig) as VxeTablePropTypes.EditOpts
452
+ return Object.assign({}, getConfig().table.editConfig, props.editConfig) as VxeTablePropTypes.EditOpts
453
453
  })
454
454
 
455
455
  const computeSortOpts = computed(() => {
456
- return Object.assign({ orders: ['asc', 'desc', null] }, XEUtils.clone(getConfig().table.sortConfig, true), props.sortConfig) as VxeTablePropTypes.SortOpts
456
+ return Object.assign({ orders: ['asc', 'desc', null] }, getConfig().table.sortConfig, props.sortConfig) as VxeTablePropTypes.SortOpts
457
457
  })
458
458
 
459
459
  const computeFilterOpts = computed(() => {
460
- return Object.assign({}, XEUtils.clone(getConfig().table.filterConfig, true), props.filterConfig) as VxeTablePropTypes.FilterOpts
460
+ return Object.assign({}, getConfig().table.filterConfig, props.filterConfig) as VxeTablePropTypes.FilterOpts
461
461
  })
462
462
 
463
463
  const computeMouseOpts = computed(() => {
464
- return Object.assign({}, XEUtils.clone(getConfig().table.mouseConfig, true), props.mouseConfig) as VxeTablePropTypes.MouseOpts
464
+ return Object.assign({}, getConfig().table.mouseConfig, props.mouseConfig) as VxeTablePropTypes.MouseOpts
465
465
  })
466
466
 
467
467
  const computeAreaOpts = computed(() => {
468
- return Object.assign({}, XEUtils.clone(getConfig().table.areaConfig, true), props.areaConfig) as VxeTablePropTypes.AreaOpts
468
+ return Object.assign({}, getConfig().table.areaConfig, props.areaConfig) as VxeTablePropTypes.AreaOpts
469
469
  })
470
470
 
471
471
  const computeKeyboardOpts = computed(() => {
472
- return Object.assign({}, XEUtils.clone(getConfig().table.keyboardConfig, true), props.keyboardConfig) as VxeTablePropTypes.KeyboardOpts
472
+ return Object.assign({}, getConfig().table.keyboardConfig, props.keyboardConfig) as VxeTablePropTypes.KeyboardOpts
473
473
  })
474
474
 
475
475
  const computeClipOpts = computed(() => {
476
- return Object.assign({}, XEUtils.clone(getConfig().table.clipConfig, true), props.clipConfig)
476
+ return Object.assign({}, getConfig().table.clipConfig, props.clipConfig)
477
477
  })
478
478
 
479
479
  const computeFNROpts = computed(() => {
480
- return Object.assign({}, XEUtils.clone(getConfig().table.fnrConfig, true), props.fnrConfig) as VxeTablePropTypes.FNROpts
480
+ return Object.assign({}, getConfig().table.fnrConfig, props.fnrConfig) as VxeTablePropTypes.FNROpts
481
481
  })
482
482
 
483
483
  const computeMenuOpts = computed(() => {
484
- return Object.assign({}, XEUtils.clone(getConfig().table.menuConfig, true), props.menuConfig) as VxeTablePropTypes.MenuOpts
484
+ return Object.assign({}, getConfig().table.menuConfig, props.menuConfig) as VxeTablePropTypes.MenuOpts
485
485
  })
486
486
 
487
487
  const computeHeaderMenu = computed(() => {
@@ -522,31 +522,31 @@ export default defineComponent({
522
522
  })
523
523
 
524
524
  const computeExportOpts = computed(() => {
525
- return Object.assign({}, XEUtils.clone(getConfig().table.exportConfig, true), props.exportConfig) as VxeTablePropTypes.ExportOpts
525
+ return Object.assign({}, getConfig().table.exportConfig, props.exportConfig) as VxeTablePropTypes.ExportOpts
526
526
  })
527
527
 
528
528
  const computeImportOpts = computed(() => {
529
- return Object.assign({}, XEUtils.clone(getConfig().table.importConfig, true), props.importConfig) as VxeTablePropTypes.ImportOpts
529
+ return Object.assign({}, getConfig().table.importConfig, props.importConfig) as VxeTablePropTypes.ImportOpts
530
530
  })
531
531
 
532
532
  const computePrintOpts = computed(() => {
533
- return Object.assign({}, XEUtils.clone(getConfig().table.printConfig, true), props.printConfig) as VxeTablePropTypes.PrintOpts
533
+ return Object.assign({}, getConfig().table.printConfig, props.printConfig) as VxeTablePropTypes.PrintOpts
534
534
  })
535
535
 
536
536
  const computeExpandOpts = computed(() => {
537
- return Object.assign({}, XEUtils.clone(getConfig().table.expandConfig, true), props.expandConfig) as VxeTablePropTypes.ExpandOpts
537
+ return Object.assign({}, getConfig().table.expandConfig, props.expandConfig) as VxeTablePropTypes.ExpandOpts
538
538
  })
539
539
 
540
540
  const computeTreeOpts = computed(() => {
541
- return Object.assign({}, XEUtils.clone(getConfig().table.treeConfig, true), props.treeConfig) as VxeTablePropTypes.TreeOpts
541
+ return Object.assign({}, getConfig().table.treeConfig, props.treeConfig) as VxeTablePropTypes.TreeOpts
542
542
  })
543
543
 
544
544
  const computeEmptyOpts = computed(() => {
545
- return Object.assign({}, XEUtils.clone(getConfig().table.emptyRender, true), props.emptyRender) as VxeTablePropTypes.EmptyOpts
545
+ return Object.assign({}, getConfig().table.emptyRender, props.emptyRender) as VxeTablePropTypes.EmptyOpts
546
546
  })
547
547
 
548
548
  const computeLoadingOpts = computed(() => {
549
- return Object.assign({}, XEUtils.clone(getConfig().table.loadingConfig, true), props.loadingConfig) as VxeTablePropTypes.LoadingOpts
549
+ return Object.assign({}, getConfig().table.loadingConfig, props.loadingConfig) as VxeTablePropTypes.LoadingOpts
550
550
  })
551
551
 
552
552
  const computeCellOffsetWidth = computed(() => {
@@ -554,7 +554,7 @@ export default defineComponent({
554
554
  })
555
555
 
556
556
  const computeCustomOpts = computed(() => {
557
- return Object.assign({}, XEUtils.clone(getConfig().table.customConfig, true), props.customConfig)
557
+ return Object.assign({}, getConfig().table.customConfig, props.customConfig)
558
558
  })
559
559
 
560
560
  const computeAutoWidthColumnList = computed(() => {
@@ -770,9 +770,9 @@ export default defineComponent({
770
770
  }
771
771
  }
772
772
  }
773
- return { toVisibleIndex: Math.max(0, toVisibleIndex), visibleSize: Math.max(8, visibleSize) }
773
+ return { toVisibleIndex: Math.max(0, toVisibleIndex), visibleSize: Math.max(6, visibleSize) }
774
774
  }
775
- return { toVisibleIndex: 0, visibleSize: 8 }
775
+ return { toVisibleIndex: 0, visibleSize: 6 }
776
776
  }
777
777
 
778
778
  const computeVirtualY = () => {
@@ -5446,11 +5446,13 @@ export default defineComponent({
5446
5446
  cacheRowMap (isSource) {
5447
5447
  const { treeConfig } = props
5448
5448
  const treeOpts = computeTreeOpts.value
5449
- let { fullDataRowIdData, fullAllDataRowIdData, tableFullData, tableFullTreeData } = internalData
5449
+ const { fullAllDataRowIdData, tableFullData, tableFullTreeData } = internalData
5450
5450
  const childrenField = treeOpts.children || treeOpts.childrenField
5451
5451
  const hasChildField = treeOpts.hasChild || treeOpts.hasChildField
5452
5452
  const rowkey = getRowkey($xeTable)
5453
5453
  const isLazy = treeConfig && treeOpts.lazy
5454
+ const fullAllDataRowIdMaps: Record<string, VxeTableDefines.RowCacheItem> = {}
5455
+ const fullDataRowIdMaps: Record<string, VxeTableDefines.RowCacheItem> = {}
5454
5456
  const handleRow = (row: any, index: any, items: any, path?: any[], parent?: any, nodes?: any[]) => {
5455
5457
  let rowid = getRowid($xeTable, row)
5456
5458
  const seq = treeConfig && path ? toTreePathSeq(path) : index + 1
@@ -5462,16 +5464,20 @@ export default defineComponent({
5462
5464
  if (isLazy && row[hasChildField] && XEUtils.isUndefined(row[childrenField])) {
5463
5465
  row[childrenField] = null
5464
5466
  }
5465
- const rest = { row, rowid, seq, index: treeConfig && parent ? -1 : index, _index: -1, $index: -1, items, parent, level }
5467
+ let cacheItem = fullAllDataRowIdData[rowid]
5468
+ if (!cacheItem) {
5469
+ cacheItem = { row, rowid, seq, index: -1, _index: -1, $index: -1, items, parent, level }
5470
+ }
5466
5471
  if (isSource) {
5467
- fullDataRowIdData[rowid] = rest
5472
+ cacheItem.index = treeConfig && parent ? -1 : index
5473
+ fullDataRowIdMaps[rowid] = cacheItem
5468
5474
  }
5469
- fullAllDataRowIdData[rowid] = rest
5475
+ fullAllDataRowIdMaps[rowid] = cacheItem
5470
5476
  }
5471
5477
  if (isSource) {
5472
- fullDataRowIdData = internalData.fullDataRowIdData = {}
5478
+ internalData.fullDataRowIdData = fullDataRowIdMaps
5473
5479
  }
5474
- fullAllDataRowIdData = internalData.fullAllDataRowIdData = {}
5480
+ internalData.fullAllDataRowIdData = fullAllDataRowIdMaps
5475
5481
  if (treeConfig) {
5476
5482
  XEUtils.eachTree(tableFullTreeData, handleRow, { children: childrenField })
5477
5483
  } else {
@@ -7179,7 +7185,7 @@ export default defineComponent({
7179
7185
  resizeObserver = globalResize.create(handleOptimizeResize
7180
7186
  ? () => {
7181
7187
  if (props.autoResize) {
7182
- requestAnimationFrame(handleOptimizeResize)
7188
+ handleOptimizeResize()
7183
7189
  }
7184
7190
  }
7185
7191
  : () => {
package/types/all.d.ts CHANGED
@@ -7,6 +7,7 @@ declare global {
7
7
  * @deprecated
8
8
  */
9
9
  VXETable: VxeUIExport;
10
+ VxeUITable: VxeUIExport;
10
11
  }
11
12
  }
12
13