vxe-table 3.13.15 → 3.14.0-beta.0

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 (33) hide show
  1. package/es/grid/src/grid.js +41 -31
  2. package/es/style.css +1 -1
  3. package/es/table/module/edit/mixin.js +3 -1
  4. package/es/table/src/methods.js +275 -160
  5. package/es/table/src/table.js +52 -51
  6. package/es/ui/index.js +1 -1
  7. package/es/ui/src/log.js +1 -1
  8. package/lib/grid/src/grid.js +41 -32
  9. package/lib/grid/src/grid.min.js +1 -1
  10. package/lib/index.umd.js +1595 -2542
  11. package/lib/index.umd.min.js +1 -1
  12. package/lib/style.css +1 -1
  13. package/lib/table/module/edit/mixin.js +3 -1
  14. package/lib/table/module/edit/mixin.min.js +1 -1
  15. package/lib/table/src/methods.js +289 -166
  16. package/lib/table/src/methods.min.js +1 -1
  17. package/lib/table/src/table.js +52 -51
  18. package/lib/table/src/table.min.js +1 -1
  19. package/lib/ui/index.js +1 -1
  20. package/lib/ui/index.min.js +1 -1
  21. package/lib/ui/src/log.js +1 -1
  22. package/lib/ui/src/log.min.js +1 -1
  23. package/package.json +1 -1
  24. package/packages/grid/src/grid.ts +41 -31
  25. package/packages/table/module/edit/mixin.ts +3 -1
  26. package/packages/table/src/methods.ts +286 -164
  27. package/packages/table/src/table.ts +55 -53
  28. /package/es/{iconfont.1740723810366.ttf → iconfont.1740732119954.ttf} +0 -0
  29. /package/es/{iconfont.1740723810366.woff → iconfont.1740732119954.woff} +0 -0
  30. /package/es/{iconfont.1740723810366.woff2 → iconfont.1740732119954.woff2} +0 -0
  31. /package/lib/{iconfont.1740723810366.ttf → iconfont.1740732119954.ttf} +0 -0
  32. /package/lib/{iconfont.1740723810366.woff → iconfont.1740732119954.woff} +0 -0
  33. /package/lib/{iconfont.1740723810366.woff2 → iconfont.1740732119954.woff2} +0 -0
@@ -1374,28 +1374,28 @@ export default {
1374
1374
  const exportOpts = $xeTable.computeExportOpts
1375
1375
  const importOpts = $xeTable.computeImportOpts
1376
1376
 
1377
- if (this.rowId) {
1377
+ if (props.rowId) {
1378
1378
  warnLog('vxe.error.delProp', ['row-id', 'row-config.keyField'])
1379
1379
  }
1380
- if (this.rowKey) {
1380
+ if (props.rowKey) {
1381
1381
  warnLog('vxe.error.delProp', ['row-key', 'row-config.useKey'])
1382
1382
  }
1383
- if (this.columnKey) {
1383
+ if (props.columnKey) {
1384
1384
  warnLog('vxe.error.delProp', ['column-id', 'column-config.useKey'])
1385
1385
  }
1386
- if (!(this.rowId || rowOpts.keyField) && (checkboxOpts.reserve || checkboxOpts.checkRowKeys || radioOpts.reserve || radioOpts.checkRowKey || expandOpts.expandRowKeys || this.treeOpts.expandRowKeys)) {
1386
+ if (!(props.rowId || rowOpts.keyField) && (checkboxOpts.reserve || checkboxOpts.checkRowKeys || radioOpts.reserve || radioOpts.checkRowKey || expandOpts.expandRowKeys || treeOpts.expandRowKeys)) {
1387
1387
  warnLog('vxe.error.reqProp', ['row-config.keyField'])
1388
1388
  }
1389
- if (this.editConfig && editOpts.showStatus && !this.keepSource) {
1389
+ if (props.editConfig && editOpts.showStatus && !props.keepSource) {
1390
1390
  warnLog('vxe.error.reqProp', ['keep-source'])
1391
1391
  }
1392
- if (treeConfig && (treeOpts.showLine || treeOpts.line) && (!(this.rowKey || rowOpts.useKey) || !showOverflow)) {
1392
+ if (treeConfig && (treeOpts.showLine || treeOpts.line) && (!(props.rowKey || rowOpts.useKey) || !showOverflow)) {
1393
1393
  warnLog('vxe.error.reqProp', ['row-config.useKey | show-overflow'])
1394
1394
  }
1395
- if (treeConfig && !treeOpts.transform && this.stripe) {
1395
+ if (treeConfig && !treeOpts.transform && props.stripe) {
1396
1396
  warnLog('vxe.error.noTree', ['stripe'])
1397
1397
  }
1398
- if (this.showFooter && !(this.footerMethod || this.footerData)) {
1398
+ if (props.showFooter && !(props.footerMethod || props.footerData)) {
1399
1399
  warnLog('vxe.error.reqProp', ['footer-data | footer-method'])
1400
1400
  }
1401
1401
  if (rowOpts.height) {
@@ -1418,31 +1418,31 @@ export default {
1418
1418
  }
1419
1419
  // 检查导入导出类型,如果自定义导入导出方法,则不校验类型
1420
1420
  if (importConfig && importOpts.types && !importOpts.importMethod && !XEUtils.includeArrays(XEUtils.keys(importOpts._typeMaps), importOpts.types)) {
1421
- warnLog('vxe.error.errProp', [`export-config.types=${importOpts.types.join(',')}`, importOpts.types.filter((type: string) => XEUtils.includes(XEUtils.keys(importOpts._typeMaps), type)).join(',') || XEUtils.keys(importOpts._typeMaps).join(',')])
1421
+ warnLog('vxe.error.errProp', [`export-config.types=${importOpts.types.join(',')}`, importOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(importOpts._typeMaps), type)).join(',') || XEUtils.keys(importOpts._typeMaps).join(',')])
1422
1422
  }
1423
1423
  if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !XEUtils.includeArrays(XEUtils.keys(exportOpts._typeMaps), exportOpts.types)) {
1424
- warnLog('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter((type: string) => XEUtils.includes(XEUtils.keys(exportOpts._typeMaps), type)).join(',') || XEUtils.keys(exportOpts._typeMaps).join(',')])
1424
+ warnLog('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(exportOpts._typeMaps), type)).join(',') || XEUtils.keys(exportOpts._typeMaps).join(',')])
1425
1425
  }
1426
1426
 
1427
- if (!this.id) {
1428
- if ((this.customConfig ? isEnableConf(customOpts) : customOpts.enabled) && customOpts.storage) {
1427
+ if (!props.id) {
1428
+ if ((props.customConfig ? isEnableConf(customOpts) : customOpts.enabled) && customOpts.storage) {
1429
1429
  errLog('vxe.error.reqProp', ['id'])
1430
1430
  }
1431
1431
  }
1432
- if (this.treeConfig && this.checkboxOpts.range) {
1432
+ if (treeConfig && checkboxOpts.range) {
1433
1433
  errLog('vxe.error.noTree', ['checkbox-config.range'])
1434
1434
  }
1435
- if (this.rowOpts.height && !this.showOverflow) {
1435
+ if (rowOpts.height && !this.showOverflow) {
1436
1436
  warnLog('vxe.error.notProp', ['table.show-overflow'])
1437
1437
  }
1438
- if (!this.handleMousedownCellAreaEvent) {
1439
- if (this.areaConfig) {
1438
+ if (!$xeTable.handleMousedownCellAreaEvent) {
1439
+ if (props.areaConfig) {
1440
1440
  warnLog('vxe.error.notProp', ['area-config'])
1441
1441
  }
1442
- if (this.clipConfig) {
1442
+ if (props.clipConfig) {
1443
1443
  warnLog('vxe.error.notProp', ['clip-config'])
1444
1444
  }
1445
- if (this.fnrConfig) {
1445
+ if (props.fnrConfig) {
1446
1446
  warnLog('vxe.error.notProp', ['fnr-config'])
1447
1447
  }
1448
1448
  if (mouseOpts.area) {
@@ -1453,21 +1453,30 @@ export default {
1453
1453
  if (treeConfig && rowOpts.drag && !treeOpts.transform) {
1454
1454
  warnLog('vxe.error.notSupportProp', ['column-config.drag', 'tree-config.transform=false', 'tree-config.transform=true'])
1455
1455
  }
1456
- if (this.dragConfig) {
1456
+ if (props.dragConfig) {
1457
1457
  warnLog('vxe.error.delProp', ['drag-config', 'row-drag-config'])
1458
1458
  }
1459
- if (this.treeConfig && treeOpts.children) {
1459
+ if (props.treeConfig && treeOpts.children) {
1460
1460
  warnLog('vxe.error.delProp', ['tree-config.children', 'tree-config.childrenField'])
1461
1461
  }
1462
- if (this.treeConfig && treeOpts.line) {
1462
+ if (props.treeConfig && treeOpts.line) {
1463
1463
  warnLog('vxe.error.delProp', ['tree-config.line', 'tree-config.showLine'])
1464
1464
  }
1465
1465
  if (mouseOpts.area && mouseOpts.selected) {
1466
1466
  warnLog('vxe.error.errConflicts', ['mouse-config.area', 'mouse-config.selected'])
1467
1467
  }
1468
- if (mouseOpts.area && (this.treeConfig && !treeOpts.transform)) {
1468
+ if (mouseOpts.area && (props.treeConfig && !treeOpts.transform)) {
1469
1469
  errLog('vxe.error.noTree', ['mouse-config.area'])
1470
1470
  }
1471
+ if (props.editConfig && editOpts.activeMethod) {
1472
+ warnLog('vxe.error.delProp', ['table.edit-config.activeMethod', 'table.edit-config.beforeEditMethod'])
1473
+ }
1474
+ if (props.treeConfig && checkboxOpts.isShiftKey) {
1475
+ errLog('vxe.error.errConflicts', ['tree-config', 'checkbox-config.isShiftKey'])
1476
+ }
1477
+ if (checkboxOpts.halfField) {
1478
+ warnLog('vxe.error.delProp', ['checkbox-config.halfField', 'checkbox-config.indeterminateField'])
1479
+ }
1471
1480
 
1472
1481
  // 在 v3.0 中废弃 context-menu
1473
1482
  if (this.contextMenu) {
@@ -1500,27 +1509,18 @@ export default {
1500
1509
  if (this.emptyRender && !XEUtils.isObject(this.emptyRender)) {
1501
1510
  warnLog('vxe.error.errProp', [`table.empty-render=${this.emptyRender}`, 'table.empty-render={}'])
1502
1511
  }
1503
- if (this.editConfig && this.editOpts.activeMethod) {
1504
- warnLog('vxe.error.delProp', ['table.edit-config.activeMethod', 'table.edit-config.beforeEditMethod'])
1505
- }
1506
- if (this.treeConfig && this.checkboxOpts.isShiftKey) {
1507
- errLog('vxe.error.errConflicts', ['tree-config', 'checkbox-config.isShiftKey'])
1508
- }
1509
- if (this.checkboxOpts.halfField) {
1510
- warnLog('vxe.error.delProp', ['checkbox-config.halfField', 'checkbox-config.indeterminateField'])
1511
- }
1512
1512
 
1513
1513
  // 检查是否有安装需要的模块
1514
- if (this.editConfig && !this._insert) {
1514
+ if (props.editConfig && !$xeTable.insert) {
1515
1515
  errLog('vxe.error.reqModule', ['Edit'])
1516
1516
  }
1517
- if (this.editRules && !this._validate) {
1517
+ if (props.editRules && !$xeTable.validate) {
1518
1518
  errLog('vxe.error.reqModule', ['Validator'])
1519
1519
  }
1520
- if ((this.checkboxOpts.range || this.keyboardConfig || this.mouseConfig) && !this.handleCellMousedownEvent) {
1520
+ if ((checkboxOpts.range || props.keyboardConfig || props.mouseConfig) && !$xeTable.handleCellMousedownEvent) {
1521
1521
  errLog('vxe.error.reqModule', ['Keyboard'])
1522
1522
  }
1523
- if ((this.printConfig || this.importConfig || this.exportConfig) && !this._exportData) {
1523
+ if ((props.printConfig || props.importConfig || props.exportConfig) && !$xeTable.exportData) {
1524
1524
  errLog('vxe.error.reqModule', ['Export'])
1525
1525
  }
1526
1526
 
@@ -1544,15 +1544,15 @@ export default {
1544
1544
  this.handleInitDefaults()
1545
1545
  this.updateStyle()
1546
1546
  })
1547
- globalEvents.on(this, 'paste', this.handleGlobalPasteEvent)
1548
- globalEvents.on(this, 'copy', this.handleGlobalCopyEvent)
1549
- globalEvents.on(this, 'cut', this.handleGlobalCutEvent)
1550
- globalEvents.on(this, 'mousedown', this.handleGlobalMousedownEvent)
1551
- globalEvents.on(this, 'blur', this.handleGlobalBlurEvent)
1552
- globalEvents.on(this, 'mousewheel', this.handleGlobalMousewheelEvent)
1553
- globalEvents.on(this, 'keydown', this.handleGlobalKeydownEvent)
1554
- globalEvents.on(this, 'resize', this.handleGlobalResizeEvent)
1555
- globalEvents.on(this, 'contextmenu', this.handleGlobalContextmenuEvent)
1547
+ globalEvents.on($xeTable, 'paste', this.handleGlobalPasteEvent)
1548
+ globalEvents.on($xeTable, 'copy', this.handleGlobalCopyEvent)
1549
+ globalEvents.on($xeTable, 'cut', this.handleGlobalCutEvent)
1550
+ globalEvents.on($xeTable, 'mousedown', this.handleGlobalMousedownEvent)
1551
+ globalEvents.on($xeTable, 'blur', this.handleGlobalBlurEvent)
1552
+ globalEvents.on($xeTable, 'mousewheel', this.handleGlobalMousewheelEvent)
1553
+ globalEvents.on($xeTable, 'keydown', this.handleGlobalKeydownEvent)
1554
+ globalEvents.on($xeTable, 'resize', this.handleGlobalResizeEvent)
1555
+ globalEvents.on($xeTable, 'contextmenu', this.handleGlobalContextmenuEvent)
1556
1556
  $xeTable.preventEvent(null, 'created')
1557
1557
  },
1558
1558
  mounted () {
@@ -1638,15 +1638,17 @@ export default {
1638
1638
  this.preventEvent(null, 'beforeDestroy')
1639
1639
  },
1640
1640
  destroyed () {
1641
- globalEvents.off(this, 'paste')
1642
- globalEvents.off(this, 'copy')
1643
- globalEvents.off(this, 'cut')
1644
- globalEvents.off(this, 'mousedown')
1645
- globalEvents.off(this, 'blur')
1646
- globalEvents.off(this, 'mousewheel')
1647
- globalEvents.off(this, 'keydown')
1648
- globalEvents.off(this, 'resize')
1649
- globalEvents.off(this, 'contextmenu')
1641
+ const $xeTable = this
1642
+
1643
+ globalEvents.off($xeTable, 'paste')
1644
+ globalEvents.off($xeTable, 'copy')
1645
+ globalEvents.off($xeTable, 'cut')
1646
+ globalEvents.off($xeTable, 'mousedown')
1647
+ globalEvents.off($xeTable, 'blur')
1648
+ globalEvents.off($xeTable, 'mousewheel')
1649
+ globalEvents.off($xeTable, 'keydown')
1650
+ globalEvents.off($xeTable, 'resize')
1651
+ globalEvents.off($xeTable, 'contextmenu')
1650
1652
  this.preventEvent(null, 'destroyed')
1651
1653
  },
1652
1654
  render (h: CreateElement) {