vxe-table 3.14.0-beta.9 → 3.14.1

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 (209) hide show
  1. package/es/grid/src/grid.js +62 -42
  2. package/es/locale/lang/ar-EG.js +7 -1
  3. package/es/locale/lang/de-DE.js +7 -1
  4. package/es/locale/lang/en-US.js +7 -1
  5. package/es/locale/lang/es-ES.js +7 -1
  6. package/es/locale/lang/fr-FR.js +7 -1
  7. package/es/locale/lang/hu-HU.js +7 -1
  8. package/es/locale/lang/hy-AM.js +7 -1
  9. package/es/locale/lang/id-ID.js +7 -1
  10. package/es/locale/lang/it-IT.js +7 -1
  11. package/es/locale/lang/ja-JP.js +7 -1
  12. package/es/locale/lang/ko-KR.js +7 -1
  13. package/es/locale/lang/nb-NO.js +7 -1
  14. package/es/locale/lang/pt-BR.js +7 -1
  15. package/es/locale/lang/ru-RU.js +7 -1
  16. package/es/locale/lang/th-TH.js +7 -1
  17. package/es/locale/lang/ug-CN.js +7 -1
  18. package/es/locale/lang/uk-UA.js +7 -1
  19. package/es/locale/lang/vi-VN.js +7 -1
  20. package/es/locale/lang/zh-CHT.js +7 -1
  21. package/es/locale/lang/zh-CN.js +7 -1
  22. package/es/style.css +1 -1
  23. package/es/table/module/custom/mixin.js +4 -2
  24. package/es/table/module/custom/panel.js +24 -23
  25. package/es/table/module/edit/mixin.js +103 -68
  26. package/es/table/module/export/export-panel.js +5 -4
  27. package/es/table/module/export/import-panel.js +8 -7
  28. package/es/table/module/export/mixin.js +30 -27
  29. package/es/table/module/filter/panel.js +21 -10
  30. package/es/table/module/keyboard/mixin.js +141 -41
  31. package/es/table/module/menu/mixin.js +6 -3
  32. package/es/table/module/menu/panel.js +7 -7
  33. package/es/table/module/validator/mixin.js +2 -5
  34. package/es/table/render/index.js +2 -2
  35. package/es/table/src/body.js +43 -25
  36. package/es/table/src/cell.js +27 -22
  37. package/es/table/src/column.js +11 -9
  38. package/es/table/src/columnInfo.js +6 -6
  39. package/es/table/src/footer.js +12 -7
  40. package/es/table/src/group.js +6 -5
  41. package/es/table/src/header.js +15 -9
  42. package/es/table/src/methods.js +1047 -971
  43. package/es/table/src/props.js +4 -0
  44. package/es/table/src/table.js +100 -64
  45. package/es/table/src/util.js +55 -20
  46. package/es/toolbar/src/toolbar.js +3 -3
  47. package/es/ui/index.js +2 -1
  48. package/es/ui/src/log.js +1 -1
  49. package/helper/vetur/attributes.json +1 -1
  50. package/helper/vetur/tags.json +1 -1
  51. package/lib/grid/src/grid.js +69 -59
  52. package/lib/grid/src/grid.min.js +1 -1
  53. package/lib/index.umd.js +2006 -1686
  54. package/lib/index.umd.min.js +1 -1
  55. package/lib/locale/lang/ar-EG.js +7 -1
  56. package/lib/locale/lang/ar-EG.min.js +1 -1
  57. package/lib/locale/lang/de-DE.js +7 -1
  58. package/lib/locale/lang/de-DE.min.js +1 -1
  59. package/lib/locale/lang/en-US.js +7 -1
  60. package/lib/locale/lang/en-US.min.js +1 -1
  61. package/lib/locale/lang/en-US.umd.js +7 -1
  62. package/lib/locale/lang/es-ES.js +7 -1
  63. package/lib/locale/lang/es-ES.min.js +1 -1
  64. package/lib/locale/lang/es-ES.umd.js +7 -1
  65. package/lib/locale/lang/fr-FR.js +7 -1
  66. package/lib/locale/lang/fr-FR.min.js +1 -1
  67. package/lib/locale/lang/hu-HU.js +7 -1
  68. package/lib/locale/lang/hu-HU.min.js +1 -1
  69. package/lib/locale/lang/hu-HU.umd.js +7 -1
  70. package/lib/locale/lang/hy-AM.js +7 -1
  71. package/lib/locale/lang/hy-AM.min.js +1 -1
  72. package/lib/locale/lang/id-ID.js +7 -1
  73. package/lib/locale/lang/id-ID.min.js +1 -1
  74. package/lib/locale/lang/it-IT.js +7 -1
  75. package/lib/locale/lang/it-IT.min.js +1 -1
  76. package/lib/locale/lang/ja-JP.js +7 -1
  77. package/lib/locale/lang/ja-JP.min.js +1 -1
  78. package/lib/locale/lang/ja-JP.umd.js +7 -1
  79. package/lib/locale/lang/ko-KR.js +7 -1
  80. package/lib/locale/lang/ko-KR.min.js +1 -1
  81. package/lib/locale/lang/ko-KR.umd.js +7 -1
  82. package/lib/locale/lang/nb-NO.js +7 -1
  83. package/lib/locale/lang/nb-NO.min.js +1 -1
  84. package/lib/locale/lang/pt-BR.js +7 -1
  85. package/lib/locale/lang/pt-BR.min.js +1 -1
  86. package/lib/locale/lang/pt-BR.umd.js +7 -1
  87. package/lib/locale/lang/ru-RU.js +7 -1
  88. package/lib/locale/lang/ru-RU.min.js +1 -1
  89. package/lib/locale/lang/ru-RU.umd.js +7 -1
  90. package/lib/locale/lang/th-TH.js +7 -1
  91. package/lib/locale/lang/th-TH.min.js +1 -1
  92. package/lib/locale/lang/ug-CN.js +7 -1
  93. package/lib/locale/lang/ug-CN.min.js +1 -1
  94. package/lib/locale/lang/uk-UA.js +7 -1
  95. package/lib/locale/lang/uk-UA.min.js +1 -1
  96. package/lib/locale/lang/uk-UA.umd.js +7 -1
  97. package/lib/locale/lang/vi-VN.js +7 -1
  98. package/lib/locale/lang/vi-VN.min.js +1 -1
  99. package/lib/locale/lang/zh-CHT.js +7 -1
  100. package/lib/locale/lang/zh-CHT.min.js +1 -1
  101. package/lib/locale/lang/zh-CHT.umd.js +7 -1
  102. package/lib/locale/lang/zh-CN.js +7 -1
  103. package/lib/locale/lang/zh-CN.min.js +1 -1
  104. package/lib/locale/lang/zh-CN.umd.js +7 -1
  105. package/lib/style.css +1 -1
  106. package/lib/table/module/custom/mixin.js +5 -3
  107. package/lib/table/module/custom/mixin.min.js +1 -1
  108. package/lib/table/module/custom/panel.js +22 -29
  109. package/lib/table/module/custom/panel.min.js +1 -1
  110. package/lib/table/module/edit/mixin.js +119 -105
  111. package/lib/table/module/edit/mixin.min.js +1 -1
  112. package/lib/table/module/export/export-panel.js +5 -4
  113. package/lib/table/module/export/export-panel.min.js +1 -1
  114. package/lib/table/module/export/import-panel.js +8 -7
  115. package/lib/table/module/export/import-panel.min.js +1 -1
  116. package/lib/table/module/export/mixin.js +35 -34
  117. package/lib/table/module/export/mixin.min.js +1 -1
  118. package/lib/table/module/filter/panel.js +16 -16
  119. package/lib/table/module/filter/panel.min.js +1 -1
  120. package/lib/table/module/keyboard/mixin.js +149 -47
  121. package/lib/table/module/keyboard/mixin.min.js +1 -1
  122. package/lib/table/module/menu/mixin.js +6 -3
  123. package/lib/table/module/menu/mixin.min.js +1 -1
  124. package/lib/table/module/menu/panel.js +7 -7
  125. package/lib/table/module/menu/panel.min.js +1 -1
  126. package/lib/table/module/validator/mixin.js +4 -10
  127. package/lib/table/module/validator/mixin.min.js +1 -1
  128. package/lib/table/render/index.js +3 -2
  129. package/lib/table/render/index.min.js +1 -1
  130. package/lib/table/src/body.js +51 -25
  131. package/lib/table/src/body.min.js +1 -1
  132. package/lib/table/src/cell.js +39 -23
  133. package/lib/table/src/cell.min.js +1 -1
  134. package/lib/table/src/column.js +11 -9
  135. package/lib/table/src/column.min.js +1 -1
  136. package/lib/table/src/columnInfo.js +6 -6
  137. package/lib/table/src/columnInfo.min.js +1 -1
  138. package/lib/table/src/footer.js +12 -5
  139. package/lib/table/src/footer.min.js +1 -1
  140. package/lib/table/src/group.js +6 -5
  141. package/lib/table/src/group.min.js +1 -1
  142. package/lib/table/src/header.js +16 -8
  143. package/lib/table/src/header.min.js +1 -1
  144. package/lib/table/src/methods.js +1219 -1151
  145. package/lib/table/src/methods.min.js +1 -1
  146. package/lib/table/src/props.js +4 -0
  147. package/lib/table/src/props.min.js +1 -1
  148. package/lib/table/src/table.js +108 -67
  149. package/lib/table/src/table.min.js +1 -1
  150. package/lib/table/src/util.js +62 -21
  151. package/lib/table/src/util.min.js +1 -1
  152. package/lib/toolbar/src/toolbar.js +3 -3
  153. package/lib/ui/index.js +2 -1
  154. package/lib/ui/index.min.js +1 -1
  155. package/lib/ui/src/log.js +1 -1
  156. package/lib/ui/src/log.min.js +1 -1
  157. package/package.json +2 -2
  158. package/packages/grid/src/grid.ts +75 -51
  159. package/packages/locale/lang/ar-EG.ts +7 -1
  160. package/packages/locale/lang/de-DE.ts +7 -1
  161. package/packages/locale/lang/en-US.ts +7 -1
  162. package/packages/locale/lang/es-ES.ts +7 -1
  163. package/packages/locale/lang/fr-FR.ts +7 -1
  164. package/packages/locale/lang/hu-HU.ts +7 -1
  165. package/packages/locale/lang/hy-AM.ts +7 -1
  166. package/packages/locale/lang/id-ID.ts +7 -1
  167. package/packages/locale/lang/it-IT.ts +7 -1
  168. package/packages/locale/lang/ja-JP.ts +7 -1
  169. package/packages/locale/lang/ko-KR.ts +7 -1
  170. package/packages/locale/lang/nb-NO.ts +7 -1
  171. package/packages/locale/lang/pt-BR.ts +7 -1
  172. package/packages/locale/lang/ru-RU.ts +7 -1
  173. package/packages/locale/lang/th-TH.ts +7 -1
  174. package/packages/locale/lang/ug-CN.ts +7 -1
  175. package/packages/locale/lang/uk-UA.ts +7 -1
  176. package/packages/locale/lang/vi-VN.ts +7 -1
  177. package/packages/locale/lang/zh-CHT.ts +7 -1
  178. package/packages/locale/lang/zh-CN.ts +7 -1
  179. package/packages/table/module/custom/mixin.ts +6 -3
  180. package/packages/table/module/custom/panel.ts +42 -37
  181. package/packages/table/module/edit/mixin.ts +139 -95
  182. package/packages/table/module/export/export-panel.ts +8 -5
  183. package/packages/table/module/export/import-panel.ts +11 -7
  184. package/packages/table/module/export/mixin.ts +37 -32
  185. package/packages/table/module/filter/panel.ts +25 -10
  186. package/packages/table/module/keyboard/mixin.ts +155 -49
  187. package/packages/table/module/menu/mixin.ts +12 -6
  188. package/packages/table/module/menu/panel.ts +10 -7
  189. package/packages/table/module/validator/mixin.ts +3 -6
  190. package/packages/table/render/index.ts +2 -2
  191. package/packages/table/src/body.ts +43 -25
  192. package/packages/table/src/cell.ts +27 -22
  193. package/packages/table/src/column.ts +14 -10
  194. package/packages/table/src/columnInfo.ts +9 -6
  195. package/packages/table/src/footer.ts +12 -7
  196. package/packages/table/src/group.ts +9 -5
  197. package/packages/table/src/header.ts +16 -9
  198. package/packages/table/src/methods.ts +1174 -1027
  199. package/packages/table/src/props.ts +16 -12
  200. package/packages/table/src/table.ts +117 -70
  201. package/packages/table/src/util.ts +65 -23
  202. package/packages/toolbar/src/toolbar.ts +3 -3
  203. package/packages/ui/index.ts +1 -0
  204. /package/es/{iconfont.1741336976538.ttf → iconfont.1743045564244.ttf} +0 -0
  205. /package/es/{iconfont.1741336976538.woff → iconfont.1743045564244.woff} +0 -0
  206. /package/es/{iconfont.1741336976538.woff2 → iconfont.1743045564244.woff2} +0 -0
  207. /package/lib/{iconfont.1741336976538.ttf → iconfont.1743045564244.ttf} +0 -0
  208. /package/lib/{iconfont.1741336976538.woff → iconfont.1743045564244.woff} +0 -0
  209. /package/lib/{iconfont.1741336976538.woff2 → iconfont.1743045564244.woff2} +0 -0
@@ -161,6 +161,8 @@ export default {
161
161
  resizeConfig: Object,
162
162
  // 列配置信息
163
163
  columnConfig: Object,
164
+ // 当前列配置信息
165
+ currentColumnConfig: Object,
164
166
  // 单元格配置信息
165
167
  cellConfig: Object,
166
168
  // 表头单元格配置信息
@@ -169,6 +171,8 @@ export default {
169
171
  footerCellConfig: Object,
170
172
  // 行配置信息
171
173
  rowConfig: Object,
174
+ // 当前行配置信息
175
+ currentRowConfig: Object,
172
176
  // 已废弃,被 rowDragConfig 替换
173
177
  dragConfig: Object,
174
178
  // 行拖拽排序配置项
@@ -1,7 +1,7 @@
1
1
  import XEUtils from 'xe-utils';
2
2
  import { getFuncText, isEnableConf } from '../../ui/src/utils';
3
3
  import { initTpImg } from '../../ui/src/dom';
4
- import { getRowid } from './util';
4
+ import { createHandleGetRowId } from './util';
5
5
  import { VxeUI } from '../../ui';
6
6
  import methods from './methods';
7
7
  import TableBodyComponent from './body';
@@ -27,14 +27,14 @@ const { getConfig, getIcon, getI18n, renderer, globalResize, globalEvents, globa
27
27
  * 渲染浮固定列
28
28
  * 分别渲染左边固定列和右边固定列
29
29
  * 如果宽度足够情况下,则不需要渲染固定列
30
- * @param {Function} h 创建 VNode 函数
31
- * @param {Object} $xetable 表格实例
32
- * @param {String} fixedType 固定列类型
33
30
  */
34
- function renderFixed(h, $xetable, fixedType) {
35
- const { _e, tableData, tableColumn, tableGroupColumn, vSize, showHeader, showFooter, columnStore, footerTableData } = $xetable;
31
+ function renderFixed(h, $xeTable, fixedType) {
32
+ const props = $xeTable;
33
+ const reactData = $xeTable;
34
+ const { showHeader, showFooter } = props;
35
+ const { tableData, tableColumn, tableGroupColumn, columnStore, footerTableData } = reactData;
36
36
  const isFixedLeft = fixedType === 'left';
37
- const fixedColumn = columnStore[`${fixedType}List`];
37
+ const fixedColumn = isFixedLeft ? columnStore.leftList : columnStore.rightList;
38
38
  return h('div', {
39
39
  ref: isFixedLeft ? 'refLeftContainer' : 'refRightContainer',
40
40
  class: `vxe-table--fixed-${fixedType}-wrapper`
@@ -46,19 +46,17 @@ function renderFixed(h, $xetable, fixedType) {
46
46
  tableData,
47
47
  tableColumn,
48
48
  tableGroupColumn,
49
- size: vSize,
50
49
  fixedColumn
51
50
  },
52
51
  ref: `${fixedType}Header`
53
52
  })
54
- : _e(),
53
+ : renderEmptyElement($xeTable),
55
54
  h(TableBodyComponent, {
56
55
  props: {
57
56
  fixedType,
58
57
  tableData,
59
58
  tableColumn,
60
- fixedColumn,
61
- size: vSize
59
+ fixedColumn
62
60
  },
63
61
  ref: `${fixedType}Body`
64
62
  }),
@@ -68,12 +66,11 @@ function renderFixed(h, $xetable, fixedType) {
68
66
  footerTableData,
69
67
  tableColumn,
70
68
  fixedColumn,
71
- fixedType,
72
- size: vSize
69
+ fixedType
73
70
  },
74
71
  ref: `${fixedType}Footer`
75
72
  })
76
- : _e()
73
+ : renderEmptyElement($xeTable)
77
74
  ]);
78
75
  }
79
76
  function renderEmptyBody(h, _vm) {
@@ -193,6 +190,7 @@ function renderRowExpandedVNs(h, $xeTable) {
193
190
  })
194
191
  ];
195
192
  if (expandColumn) {
193
+ const { handleGetRowId } = createHandleGetRowId($xeTable);
196
194
  tableRowExpandedList.forEach((row) => {
197
195
  const expandOpts = $xeTable.computeExpandOpts;
198
196
  const { height: expandHeight, padding } = expandOpts;
@@ -200,7 +198,7 @@ function renderRowExpandedVNs(h, $xeTable) {
200
198
  const treeOpts = $xeTable.computeTreeOpts;
201
199
  const { transform, seqMode } = treeOpts;
202
200
  const cellStyle = {};
203
- const rowid = getRowid($xeTable, row);
201
+ const rowid = handleGetRowId(row);
204
202
  const rest = fullAllDataRowIdData[rowid];
205
203
  let rowLevel = 0;
206
204
  let seq = -1;
@@ -394,7 +392,6 @@ export default {
394
392
  props: tableProps,
395
393
  provide() {
396
394
  return {
397
- $xetable: this,
398
395
  $xeTable: this,
399
396
  xecolgroup: null
400
397
  };
@@ -405,9 +402,6 @@ export default {
405
402
  },
406
403
  $xeGrid: {
407
404
  default: null
408
- },
409
- $xegrid: {
410
- default: null
411
405
  }
412
406
  },
413
407
  data() {
@@ -446,8 +440,6 @@ export default {
446
440
  isAllSelected: false,
447
441
  // 复选框属性,有选中且非全选状态
448
442
  isIndeterminate: false,
449
- // 复选框属性,已选中的行集合
450
- selectCheckboxMaps: {},
451
443
  // 当前行
452
444
  currentRow: null,
453
445
  // 单选框属性,选中列
@@ -461,16 +453,6 @@ export default {
461
453
  hasFixedColumn: false,
462
454
  // 树节点列信息
463
455
  treeNodeColumn: null,
464
- // 已展开的行集合
465
- rowExpandedMaps: {},
466
- // 懒加载中的展开行的集合
467
- rowExpandLazyLoadedMaps: {},
468
- // 已展开树节点集合
469
- treeExpandedMaps: {},
470
- // 懒加载中的树节点的集合
471
- treeExpandLazyLoadedMaps: {},
472
- // 树节点不确定状态的集合
473
- treeIndeterminateMaps: {},
474
456
  // 合并单元格的对象集
475
457
  mergeList: [],
476
458
  // 合并表尾数据的对象集
@@ -487,8 +469,6 @@ export default {
487
469
  upDataFlag: 0,
488
470
  // 刷新列标识,当列的特定属性被改变时,触发表格刷新列
489
471
  reColumnFlag: 0,
490
- // 已标记的对象集
491
- pendingRowMaps: {},
492
472
  // 自定义列相关的信息
493
473
  customStore: {
494
474
  btnEl: null,
@@ -564,9 +544,7 @@ export default {
564
544
  focused: {
565
545
  row: null,
566
546
  column: null
567
- },
568
- insertMaps: {},
569
- removeMaps: {}
547
+ }
570
548
  },
571
549
  // 存放 tooltip 相关信息
572
550
  tooltipStore: {
@@ -623,6 +601,10 @@ export default {
623
601
  isHeader: false,
624
602
  isFooter: false
625
603
  },
604
+ rowExpandedFlag: 1,
605
+ treeExpandedFlag: 1,
606
+ updateCheckboxFlag: 1,
607
+ pendingRowFlag: 1,
626
608
  rowHeightStore: {
627
609
  default: 48,
628
610
  medium: 44,
@@ -639,6 +621,7 @@ export default {
639
621
  rowExpandHeightFlag: 1,
640
622
  calcCellHeightFlag: 1,
641
623
  resizeHeightFlag: 1,
624
+ resizeWidthFlag: 1,
642
625
  isCustomStatus: false,
643
626
  isDragRowMove: false,
644
627
  dragRow: null,
@@ -673,22 +656,22 @@ export default {
673
656
  return Object.assign({ message: 'default' }, getConfig().table.validConfig, this.validConfig);
674
657
  },
675
658
  sXOpts() {
676
- return this.computeSXOpts;
659
+ return this.computeVirtualXOpts;
677
660
  },
678
661
  computeSXOpts() {
679
662
  return this.computeVirtualXOpts;
680
663
  },
681
664
  computeScrollXThreshold() {
682
665
  const $xeTable = this;
683
- const sXOpts = $xeTable.computeSXOpts;
684
- const { threshold } = sXOpts;
666
+ const virtualXOpts = $xeTable.computeVirtualXOpts;
667
+ const { threshold } = virtualXOpts;
685
668
  if (threshold) {
686
669
  return XEUtils.toNumber(threshold);
687
670
  }
688
671
  return 0;
689
672
  },
690
673
  sYOpts() {
691
- return this.computeSYOpts;
674
+ return this.computeVirtualYOpts;
692
675
  },
693
676
  computeSYOpts() {
694
677
  return this.computeVirtualYOpts;
@@ -720,8 +703,8 @@ export default {
720
703
  },
721
704
  computeScrollYThreshold() {
722
705
  const $xeTable = this;
723
- const sYOpts = $xeTable.computeSYOpts;
724
- const { threshold } = sYOpts;
706
+ const virtualYOpts = $xeTable.computeVirtualYOpts;
707
+ const { threshold } = virtualYOpts;
725
708
  if (threshold) {
726
709
  return XEUtils.toNumber(threshold);
727
710
  }
@@ -745,28 +728,54 @@ export default {
745
728
  return this.computeColumnOpts;
746
729
  },
747
730
  computeColumnOpts() {
748
- return Object.assign({}, getConfig().table.columnConfig, this.columnConfig);
731
+ const $xeTable = this;
732
+ const props = $xeTable;
733
+ return Object.assign({}, getConfig().table.columnConfig, props.columnConfig);
734
+ },
735
+ computeCurrentColumnOpts() {
736
+ const $xeTable = this;
737
+ const props = $xeTable;
738
+ return Object.assign({}, getConfig().table.currentColumnConfig, props.currentColumnConfig);
749
739
  },
750
740
  computeCellOpts() {
751
741
  const $xeTable = this;
752
742
  const props = $xeTable;
753
- return Object.assign({}, getConfig().table.cellConfig, props.cellConfig);
743
+ const cellOpts = Object.assign({}, getConfig().table.cellConfig, props.cellConfig);
744
+ if (cellOpts.height) {
745
+ cellOpts.height = XEUtils.toNumber(cellOpts.height);
746
+ }
747
+ return cellOpts;
754
748
  },
755
749
  computeHeaderCellOpts() {
756
750
  const $xeTable = this;
757
751
  const props = $xeTable;
758
- return Object.assign({}, getConfig().table.headerCellConfig, props.headerCellConfig);
752
+ const headerCellOpts = Object.assign({}, getConfig().table.headerCellConfig, props.headerCellConfig);
753
+ if (headerCellOpts.height) {
754
+ headerCellOpts.height = XEUtils.toNumber(headerCellOpts.height);
755
+ }
756
+ return headerCellOpts;
759
757
  },
760
758
  computeFooterCellOpts() {
761
759
  const $xeTable = this;
762
760
  const props = $xeTable;
763
- return Object.assign({}, getConfig().table.footerCellConfig, props.footerCellConfig);
761
+ const footerCellOpts = Object.assign({}, getConfig().table.footerCellConfig, props.footerCellConfig);
762
+ if (footerCellOpts.height) {
763
+ footerCellOpts.height = XEUtils.toNumber(footerCellOpts.height);
764
+ }
765
+ return footerCellOpts;
764
766
  },
765
767
  rowOpts() {
766
768
  return this.computeRowOpts;
767
769
  },
768
770
  computeRowOpts() {
769
- return Object.assign({}, getConfig().table.rowConfig, this.rowConfig);
771
+ const $xeTable = this;
772
+ const props = $xeTable;
773
+ return Object.assign({}, getConfig().table.rowConfig, props.rowConfig);
774
+ },
775
+ computeCurrentRowOpts() {
776
+ const $xeTable = this;
777
+ const props = $xeTable;
778
+ return Object.assign({}, getConfig().table.currentRowConfig, props.currentRowConfig);
770
779
  },
771
780
  computeRowDragOpts() {
772
781
  return Object.assign({}, getConfig().table.rowDragConfig, this.rowDragConfig);
@@ -790,25 +799,33 @@ export default {
790
799
  return this.computeSeqOpts;
791
800
  },
792
801
  computeSeqOpts() {
793
- return Object.assign({ startIndex: 0 }, getConfig().table.seqConfig, this.seqConfig);
802
+ const $xeTable = this;
803
+ const props = $xeTable;
804
+ return Object.assign({ startIndex: 0 }, getConfig().table.seqConfig, props.seqConfig);
794
805
  },
795
806
  radioOpts() {
796
807
  return this.computeRadioOpts;
797
808
  },
798
809
  computeRadioOpts() {
799
- return Object.assign({}, getConfig().table.radioConfig, this.radioConfig);
810
+ const $xeTable = this;
811
+ const props = $xeTable;
812
+ return Object.assign({}, getConfig().table.radioConfig, props.radioConfig);
800
813
  },
801
814
  checkboxOpts() {
802
815
  return this.computeCheckboxOpts;
803
816
  },
804
817
  computeCheckboxOpts() {
805
- return Object.assign({}, getConfig().table.checkboxConfig, this.checkboxConfig);
818
+ const $xeTable = this;
819
+ const props = $xeTable;
820
+ return Object.assign({}, getConfig().table.checkboxConfig, props.checkboxConfig);
806
821
  },
807
822
  tooltipOpts() {
808
823
  return this.computeTooltipOpts;
809
824
  },
810
825
  computeTooltipOpts() {
811
- return Object.assign({}, getConfig().tooltip, getConfig().table.tooltipConfig, this.tooltipConfig);
826
+ const $xeTable = this;
827
+ const props = $xeTable;
828
+ return Object.assign({}, getConfig().tooltip, getConfig().table.tooltipConfig, props.tooltipConfig);
812
829
  },
813
830
  tipConfig() {
814
831
  return Object.assign({}, this.tooltipOpts);
@@ -1014,12 +1031,15 @@ export default {
1014
1031
  computeTableRowExpandedList() {
1015
1032
  const $xeTable = this;
1016
1033
  const reactData = $xeTable;
1017
- const { rowExpandedMaps, tableData, expandColumn } = reactData;
1034
+ const internalData = $xeTable;
1035
+ const { rowExpandedFlag, tableData, expandColumn } = reactData;
1036
+ const { rowExpandedMaps } = internalData;
1037
+ const { handleGetRowId } = createHandleGetRowId($xeTable);
1018
1038
  const expandList = [];
1019
- if (expandColumn) {
1039
+ if (expandColumn && rowExpandedFlag) {
1020
1040
  const rowKeys = {};
1021
1041
  tableData.forEach(row => {
1022
- rowKeys[getRowid($xeTable, row)] = true;
1042
+ rowKeys[handleGetRowId(row)] = true;
1023
1043
  });
1024
1044
  XEUtils.each(rowExpandedMaps, (row, rowid) => {
1025
1045
  if (rowKeys[rowid]) {
@@ -1256,13 +1276,15 @@ export default {
1256
1276
  lastScrollTop: 0,
1257
1277
  // 单选框属性,已选中保留的行
1258
1278
  radioReserveRow: null,
1259
- // 复选框属性,已选中保留的行
1279
+ // 复选框属性,已选中保留的行集合
1260
1280
  checkboxReserveRowMap: {},
1261
- // 行数据,已展开保留的行
1281
+ // 行数据,已展开保留的行集合
1262
1282
  rowExpandedReserveRowMap: {},
1263
- // 树结构数据,已展开保留的行
1283
+ // 树结构数据,已展开保留的行集合
1264
1284
  treeExpandedReserveRowMap: {},
1265
- // 完整数据、条件处理后
1285
+ // 树结构数据,不确定状态的集合
1286
+ treeIndeterminateRowMaps: {},
1287
+ // 列表完整数据、条件处理后
1266
1288
  tableFullData: [],
1267
1289
  afterFullData: [],
1268
1290
  // 列表条件处理后数据集合
@@ -1273,20 +1295,35 @@ export default {
1273
1295
  tableFullColumn: [],
1274
1296
  // 渲染所有列
1275
1297
  visibleColumn: [],
1276
- // 缓存数据集
1298
+ // 总的缓存数据集
1277
1299
  fullAllDataRowIdData: {},
1278
- fullDataRowMap: new Map(),
1300
+ // 渲染中缓存数据
1301
+ sourceDataRowIdData: {},
1279
1302
  fullDataRowIdData: {},
1280
- fullColumnMap: new Map(),
1281
1303
  fullColumnIdData: {},
1282
1304
  fullColumnFieldData: {},
1305
+ // 已展开的行集合
1306
+ rowExpandedMaps: {},
1307
+ // 懒加载中的展开行的集合
1308
+ rowExpandLazyLoadedMaps: {},
1309
+ // 已展开树节点集合
1310
+ treeExpandedMaps: {},
1311
+ // 懒加载中的树节点的集合
1312
+ treeExpandLazyLoadedMaps: {},
1313
+ // 复选框属性,已选中的行集合
1314
+ selectCheckboxMaps: {},
1315
+ // 已标记的对象集
1316
+ pendingRowMaps: {},
1317
+ // 已新增的临时行
1318
+ insertRowMaps: {},
1319
+ // 已删除行
1320
+ removeRowMaps: {},
1283
1321
  swYSize: 0,
1284
1322
  swYInterval: 0,
1285
1323
  swYTotal: 0
1286
1324
  });
1287
1325
  const { data, exportConfig, importConfig, treeConfig, showOverflow } = props;
1288
1326
  const { scrollXStore, scrollYStore } = internalData;
1289
- const sYOpts = $xeTable.computeSYOpts;
1290
1327
  const editOpts = $xeTable.computeEditOpts;
1291
1328
  const treeOpts = $xeTable.computeTreeOpts;
1292
1329
  const radioOpts = $xeTable.computeRadioOpts;
@@ -1446,8 +1483,7 @@ export default {
1446
1483
  Object.assign(scrollYStore, {
1447
1484
  startIndex: 0,
1448
1485
  endIndex: 1,
1449
- visibleSize: 0,
1450
- adaptive: sYOpts.adaptive !== false
1486
+ visibleSize: 0
1451
1487
  });
1452
1488
  Object.assign(scrollXStore, {
1453
1489
  startIndex: 0,
@@ -97,27 +97,55 @@ export function getRowkey($xeTable) {
97
97
  return `${props.rowId || rowOpts.keyField || '_X_ROW_KEY'}`;
98
98
  }
99
99
  // 行主键 value
100
- export function getRowid($xetable, row) {
101
- const rowid = XEUtils.get(row, getRowkey($xetable));
100
+ export function getRowid($xeTable, row) {
101
+ const rowid = XEUtils.get(row, getRowkey($xeTable));
102
102
  return encodeRowid(rowid);
103
103
  }
104
+ export function createHandleUpdateRowId($xeTable) {
105
+ const rowKey = getRowkey($xeTable);
106
+ const isDeepKey = rowKey.indexOf('.') > -1;
107
+ const updateRId = isDeepKey ? updateDeepRowKey : updateFastRowKey;
108
+ return {
109
+ rowKey,
110
+ handleUpdateRowId(row) {
111
+ return row ? updateRId(row, rowKey) : null;
112
+ }
113
+ };
114
+ }
115
+ export function createHandleGetRowId($xeTable) {
116
+ const rowKey = getRowkey($xeTable);
117
+ const isDeepKey = rowKey.indexOf('.') > -1;
118
+ const getRId = isDeepKey ? getDeepRowIdByKey : getFastRowIdByKey;
119
+ return {
120
+ rowKey,
121
+ handleGetRowId(row) {
122
+ return row ? getRId(row, rowKey) : null;
123
+ }
124
+ };
125
+ }
104
126
  // 编码行主键
105
127
  export function encodeRowid(rowVal) {
106
128
  return XEUtils.eqNull(rowVal) ? '' : encodeURIComponent(rowVal);
107
129
  }
108
- export function updateDeepRowKey(row, rowkey) {
109
- let rowid = XEUtils.get(row, rowkey);
130
+ function getDeepRowIdByKey(row, rowKey) {
131
+ return XEUtils.get(row, rowKey);
132
+ }
133
+ export function updateDeepRowKey(row, rowKey) {
134
+ let rowid = getDeepRowIdByKey(row, rowKey);
110
135
  if (eqEmptyValue(rowid)) {
111
136
  rowid = getRowUniqueId();
112
- XEUtils.set(row, rowkey, rowid);
137
+ XEUtils.set(row, rowKey, rowid);
113
138
  }
114
139
  return rowid;
115
140
  }
116
- export function updateFastRowKey(row, rowkey) {
117
- let rowid = row[rowkey];
141
+ function getFastRowIdByKey(row, rowKey) {
142
+ return row[rowKey];
143
+ }
144
+ export function updateFastRowKey(row, rowKey) {
145
+ let rowid = getFastRowIdByKey(row, rowKey);
118
146
  if (eqEmptyValue(rowid)) {
119
147
  rowid = getRowUniqueId();
120
- row[rowkey] = rowid;
148
+ row[rowKey] = rowid;
121
149
  }
122
150
  return rowid;
123
151
  }
@@ -160,34 +188,41 @@ export const handleRowidOrRow = ($xeTable, rowidOrRow) => {
160
188
  };
161
189
  // 组装列配置
162
190
  export function assembleColumn(_vm) {
163
- const { $el, $xetable, $xecolumn, columnConfig } = _vm;
164
- const groupConfig = $xecolumn ? $xecolumn.columnConfig : null;
191
+ const $xeTable = _vm.$xeTable;
192
+ const reactData = $xeTable;
193
+ const { staticColumns } = reactData;
194
+ const { $el, $xeColumn, columnConfig } = _vm;
195
+ const groupConfig = $xeColumn ? $xeColumn.columnConfig : null;
165
196
  if (groupConfig) {
166
- if ($xecolumn.$options._componentTag === 'vxe-table-column') {
167
- errLog('vxe.error.groupTag', [`<vxe-table-colgroup title=${$xecolumn.title} ...>`, `<vxe-table-column title=${$xecolumn.title} ...>`]);
197
+ if ($xeColumn.$options._componentTag === 'vxe-table-column') {
198
+ errLog('vxe.error.groupTag', [`<vxe-table-colgroup title=${$xeColumn.title} ...>`, `<vxe-table-column title=${$xeColumn.title} ...>`]);
168
199
  }
169
- else if ($xecolumn.$options._componentTag === 'vxe-column') {
170
- warnLog('vxe.error.groupTag', [`<vxe-colgroup title=${$xecolumn.title} ...>`, `<vxe-column title=${$xecolumn.title} ...>`]);
200
+ else if ($xeColumn.$options._componentTag === 'vxe-column') {
201
+ warnLog('vxe.error.groupTag', [`<vxe-colgroup title=${$xeColumn.title} ...>`, `<vxe-column title=${$xeColumn.title} ...>`]);
171
202
  }
172
203
  if (!groupConfig.children) {
173
204
  groupConfig.children = [];
174
205
  }
175
- groupConfig.children.splice(XEUtils.arrayIndexOf($xecolumn.$el.children, $el), 0, columnConfig);
206
+ groupConfig.children.splice(XEUtils.arrayIndexOf($xeColumn.$el.children, $el), 0, columnConfig);
176
207
  }
177
208
  else {
178
- $xetable.staticColumns.splice(XEUtils.arrayIndexOf($xetable.$refs.hideColumn.children, $el), 0, columnConfig);
209
+ staticColumns.splice(XEUtils.arrayIndexOf($xeTable.$refs.hideColumn.children, $el), 0, columnConfig);
179
210
  }
180
211
  }
181
212
  // 销毁列
182
213
  export function destroyColumn(_vm) {
183
- const { $xetable, columnConfig } = _vm;
184
- const matchObj = XEUtils.findTree($xetable.staticColumns, column => column === columnConfig);
214
+ const $xeTable = _vm.$xeTable;
215
+ const reactData = $xeTable;
216
+ const { staticColumns } = reactData;
217
+ const { columnConfig } = _vm;
218
+ const matchObj = XEUtils.findTree(staticColumns, column => column === columnConfig);
185
219
  if (matchObj) {
186
220
  matchObj.items.splice(matchObj.index, 1);
187
221
  }
188
222
  }
189
- export function getRootColumn($xetable, column) {
190
- const fullColumnIdData = $xetable.fullColumnIdData;
223
+ export function getRootColumn($xeTable, column) {
224
+ const internalData = $xeTable;
225
+ const { fullColumnIdData } = internalData;
191
226
  if (!column) {
192
227
  return null;
193
228
  }
@@ -663,13 +663,13 @@ export default {
663
663
  $xeToolbar.$nextTick(() => {
664
664
  const { refresh } = props;
665
665
  const refreshOpts = $xeToolbar.computeRefreshOpts;
666
- const $xetable = this.fintTable();
666
+ const $xeTable = this.fintTable();
667
667
  const queryMethod = refreshOpts.queryMethod || refreshOpts.query;
668
668
  if (refresh && !$xeGrid && !queryMethod) {
669
669
  warnLog('vxe.error.notFunc', ['queryMethod']);
670
670
  }
671
- if ($xetable) {
672
- $xetable.connect(this);
671
+ if ($xeTable) {
672
+ $xeTable.connect(this);
673
673
  }
674
674
  const customOpts = $xeToolbar.computeCustomOpts;
675
675
  if (customOpts.isFooter) {
package/es/ui/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  import { getFuncText } from './src/utils';
3
- export const version = "3.14.0-beta.9";
3
+ export const version = "3.14.1";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
@@ -124,6 +124,7 @@ VxeUI.setConfig({
124
124
  // remote: false,
125
125
  // filterMethod: null,
126
126
  // destroyOnClose: false,
127
+ // isEvery: false,
127
128
  showIcon: true
128
129
  },
129
130
  treeConfig: {
package/es/ui/src/log.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const version = `table v${"3.14.0-beta.9"}`;
3
+ const version = `table v${"3.14.1"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);