vxe-table 3.10.4 → 3.10.6

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 (48) hide show
  1. package/es/grid/src/grid.js +1 -1
  2. package/es/style.css +1 -1
  3. package/es/style.min.css +1 -1
  4. package/es/table/module/custom/mixin.js +130 -2
  5. package/es/table/module/custom/panel.js +327 -338
  6. package/es/table/module/export/export-panel.js +2 -2
  7. package/es/table/src/methods.js +25 -38
  8. package/es/table/style.css +42 -37
  9. package/es/table/style.min.css +1 -1
  10. package/es/ui/index.js +1 -1
  11. package/es/ui/src/log.js +1 -1
  12. package/es/vxe-table/style.css +42 -37
  13. package/es/vxe-table/style.min.css +1 -1
  14. package/lib/grid/src/grid.js +1 -1
  15. package/lib/grid/src/grid.min.js +1 -1
  16. package/lib/index.umd.js +387 -306
  17. package/lib/index.umd.min.js +1 -1
  18. package/lib/style.css +1 -1
  19. package/lib/style.min.css +1 -1
  20. package/lib/table/module/custom/mixin.js +176 -2
  21. package/lib/table/module/custom/mixin.min.js +1 -1
  22. package/lib/table/module/custom/panel.js +182 -255
  23. package/lib/table/module/custom/panel.min.js +1 -1
  24. package/lib/table/module/export/export-panel.js +2 -2
  25. package/lib/table/module/export/export-panel.min.js +1 -1
  26. package/lib/table/src/methods.js +24 -44
  27. package/lib/table/src/methods.min.js +1 -1
  28. package/lib/table/style/style.css +42 -37
  29. package/lib/table/style/style.min.css +1 -1
  30. package/lib/ui/index.js +1 -1
  31. package/lib/ui/index.min.js +1 -1
  32. package/lib/ui/src/log.js +1 -1
  33. package/lib/ui/src/log.min.js +1 -1
  34. package/lib/vxe-table/style/style.css +42 -37
  35. package/lib/vxe-table/style/style.min.css +1 -1
  36. package/package.json +2 -2
  37. package/packages/grid/src/grid.ts +1 -1
  38. package/packages/table/module/custom/mixin.ts +131 -2
  39. package/packages/table/module/custom/panel.ts +332 -337
  40. package/packages/table/module/export/export-panel.ts +2 -2
  41. package/packages/table/src/methods.ts +24 -37
  42. package/styles/components/table-module/custom.scss +21 -5
  43. /package/es/{iconfont.1730945625063.ttf → iconfont.1730978752470.ttf} +0 -0
  44. /package/es/{iconfont.1730945625063.woff → iconfont.1730978752470.woff} +0 -0
  45. /package/es/{iconfont.1730945625063.woff2 → iconfont.1730978752470.woff2} +0 -0
  46. /package/lib/{iconfont.1730945625063.ttf → iconfont.1730978752470.ttf} +0 -0
  47. /package/lib/{iconfont.1730945625063.woff → iconfont.1730978752470.woff} +0 -0
  48. /package/lib/{iconfont.1730945625063.woff2 → iconfont.1730978752470.woff2} +0 -0
@@ -300,7 +300,7 @@ export default {
300
300
  ? h('td', [
301
301
  h('div', {
302
302
  class: 'vxe-table-export--panel-option-row'
303
- }, $xeTable.callSlot(parameterSlot, params))
303
+ }, $xeTable.callSlot(parameterSlot, params, h))
304
304
  ])
305
305
  : h('td', [
306
306
  h('div', {
@@ -426,7 +426,7 @@ export default {
426
426
  return h('div', {
427
427
  class: 'vxe-table-export--panel-footer'
428
428
  }, footerSlot
429
- ? $xeTable.callSlot(footerSlot, params)
429
+ ? $xeTable.callSlot(footerSlot, params, h)
430
430
  : [
431
431
  h('div', {
432
432
  class: 'vxe-table-export--panel-btns'
@@ -1861,31 +1861,8 @@ const Methods = {
1861
1861
  * 如果已关联工具栏,则会同步更新
1862
1862
  */
1863
1863
  resetColumn(options) {
1864
- const { collectColumn, customOpts } = this;
1865
- const { checkMethod } = customOpts;
1866
- const opts = Object.assign({
1867
- visible: true,
1868
- resizable: options === true,
1869
- fixed: options === true,
1870
- sort: options === true
1871
- }, options);
1872
- XEUtils.eachTree(collectColumn, (column) => {
1873
- if (opts.resizable) {
1874
- column.resizeWidth = 0;
1875
- }
1876
- if (opts.fixed) {
1877
- column.fixed = column.defaultFixed;
1878
- }
1879
- if (opts.sort) {
1880
- column.renderSortNumber = column.sortNumber;
1881
- }
1882
- if (!checkMethod || checkMethod({ column })) {
1883
- column.visible = column.defaultVisible;
1884
- }
1885
- column.renderResizeWidth = column.renderWidth;
1886
- });
1887
- this.saveCustomStore('reset');
1888
- return this.handleCustom();
1864
+ warnLog('vxe.error.delFunc', ['resetColumn', 'resetCustom']);
1865
+ return this.resetCustom(options);
1889
1866
  },
1890
1867
  handleCustom() {
1891
1868
  const { mouseConfig } = this;
@@ -5083,10 +5060,14 @@ const Methods = {
5083
5060
  rowExpandLazyLoadedMaps[rowid] = row;
5084
5061
  loadMethod({ $table: $xeTable, row, rowIndex: this.getRowIndex(row), $rowIndex: this.getVMRowIndex(row) }).then(() => {
5085
5062
  const { rowExpandedMaps } = this;
5086
- rowRest.expandLoaded = true;
5063
+ if (rowRest) {
5064
+ rowRest.expandLoaded = true;
5065
+ }
5087
5066
  rowExpandedMaps[rowid] = row;
5088
5067
  }).catch(() => {
5089
- rowRest.expandLoaded = false;
5068
+ if (rowRest) {
5069
+ rowRest.expandLoaded = false;
5070
+ }
5090
5071
  }).finally(() => {
5091
5072
  const { rowExpandLazyLoadedMaps } = this;
5092
5073
  if (rowExpandLazyLoadedMaps[rowid]) {
@@ -5353,7 +5334,9 @@ const Methods = {
5353
5334
  const rowRest = fullAllDataRowIdData[rowid];
5354
5335
  treeExpandLazyLoadedMaps[rowid] = row;
5355
5336
  Promise.resolve(loadMethod({ $table: $xeTable, row })).then((childRecords) => {
5356
- rowRest.treeLoaded = true;
5337
+ if (rowRest) {
5338
+ rowRest.treeLoaded = true;
5339
+ }
5357
5340
  if (treeExpandLazyLoadedMaps[rowid]) {
5358
5341
  delete treeExpandLazyLoadedMaps[rowid];
5359
5342
  }
@@ -5379,7 +5362,9 @@ const Methods = {
5379
5362
  }
5380
5363
  }).catch(() => {
5381
5364
  const { treeExpandLazyLoadedMaps } = this;
5382
- rowRest.treeLoaded = false;
5365
+ if (rowRest) {
5366
+ rowRest.treeLoaded = false;
5367
+ }
5383
5368
  if (treeExpandLazyLoadedMaps[rowid]) {
5384
5369
  delete treeExpandLazyLoadedMaps[rowid];
5385
5370
  }
@@ -5443,14 +5428,16 @@ const Methods = {
5443
5428
  const rowid = getRowid(this, row);
5444
5429
  if (!treeTempExpandedMaps[rowid]) {
5445
5430
  const rowRest = fullAllDataRowIdData[rowid];
5446
- const isLoad = lazy && row[hasChildField] && !rowRest.treeLoaded && !treeExpandLazyLoadedMaps[rowid];
5447
- // 是否使用懒加载
5448
- if (isLoad) {
5449
- result.push(this.handleAsyncTreeExpandChilds(row));
5450
- }
5451
- else {
5452
- if (row[childrenField] && row[childrenField].length) {
5453
- treeTempExpandedMaps[rowid] = row;
5431
+ if (rowRest) {
5432
+ const isLoad = lazy && row[hasChildField] && !rowRest.treeLoaded && !treeExpandLazyLoadedMaps[rowid];
5433
+ // 是否使用懒加载
5434
+ if (isLoad) {
5435
+ result.push(this.handleAsyncTreeExpandChilds(row));
5436
+ }
5437
+ else {
5438
+ if (row[childrenField] && row[childrenField].length) {
5439
+ treeTempExpandedMaps[rowid] = row;
5440
+ }
5454
5441
  }
5455
5442
  }
5456
5443
  }
@@ -6222,7 +6209,7 @@ const Methods = {
6222
6209
  }
6223
6210
  };
6224
6211
  // Module methods
6225
- const funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom'.split(',');
6212
+ const funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom,saveCustom,cancelCustom,resetCustom,toggleCustomAllCheckbox,setCustomAllCheckbox'.split(',');
6226
6213
  funcs.forEach(name => {
6227
6214
  Methods[name] = function (...args) {
6228
6215
  if (process.env.NODE_ENV === 'development') {
@@ -784,79 +784,63 @@
784
784
  display: flex;
785
785
  }
786
786
 
787
- .vxe-table-custom--list-wrapper {
787
+ .vxe-table-custom--body {
788
788
  display: block;
789
789
  flex-grow: 1;
790
790
  overflow-x: hidden;
791
791
  overflow-y: auto;
792
792
  }
793
793
 
794
- .vxe-table-custom--header,
795
- .vxe-table-custom--body {
794
+ .vxe-table-custom--panel-list {
796
795
  list-style-type: none;
797
796
  margin: 0;
798
797
  padding: 0;
799
798
  }
800
- .vxe-table-custom--header > li,
801
- .vxe-table-custom--body > li {
799
+ .vxe-table-custom--panel-list > li {
802
800
  max-width: 26em;
803
801
  min-width: 17em;
804
802
  padding: 0.2em 1em 0.2em 1em;
805
803
  }
806
- .vxe-table-custom--header > li.level--2,
807
- .vxe-table-custom--body > li.level--2 {
804
+ .vxe-table-custom--panel-list > li.level--2 {
808
805
  padding-left: 3.5em;
809
806
  }
810
- .vxe-table-custom--header > li.level--2 .vxe-checkbox--icon,
811
- .vxe-table-custom--body > li.level--2 .vxe-checkbox--icon {
807
+ .vxe-table-custom--panel-list > li.level--2 .vxe-checkbox--icon {
812
808
  left: 1.8em;
813
809
  }
814
- .vxe-table-custom--header > li.level--3,
815
- .vxe-table-custom--body > li.level--3 {
810
+ .vxe-table-custom--panel-list > li.level--3 {
816
811
  padding-left: 4.5em;
817
812
  }
818
- .vxe-table-custom--header > li.level--3 .vxe-checkbox--icon,
819
- .vxe-table-custom--body > li.level--3 .vxe-checkbox--icon {
813
+ .vxe-table-custom--panel-list > li.level--3 .vxe-checkbox--icon {
820
814
  left: 2.8em;
821
815
  }
822
- .vxe-table-custom--header > li.level--4,
823
- .vxe-table-custom--body > li.level--4 {
816
+ .vxe-table-custom--panel-list > li.level--4 {
824
817
  padding-left: 5.5em;
825
818
  }
826
- .vxe-table-custom--header > li.level--4 .vxe-checkbox--icon,
827
- .vxe-table-custom--body > li.level--4 .vxe-checkbox--icon {
819
+ .vxe-table-custom--panel-list > li.level--4 .vxe-checkbox--icon {
828
820
  left: 3.8em;
829
821
  }
830
- .vxe-table-custom--header > li.level--5,
831
- .vxe-table-custom--body > li.level--5 {
822
+ .vxe-table-custom--panel-list > li.level--5 {
832
823
  padding-left: 6.5em;
833
824
  }
834
- .vxe-table-custom--header > li.level--5 .vxe-checkbox--icon,
835
- .vxe-table-custom--body > li.level--5 .vxe-checkbox--icon {
825
+ .vxe-table-custom--panel-list > li.level--5 .vxe-checkbox--icon {
836
826
  left: 4.8em;
837
827
  }
838
- .vxe-table-custom--header > li.level--6,
839
- .vxe-table-custom--body > li.level--6 {
828
+ .vxe-table-custom--panel-list > li.level--6 {
840
829
  padding-left: 7.5em;
841
830
  }
842
- .vxe-table-custom--header > li.level--6 .vxe-checkbox--icon,
843
- .vxe-table-custom--body > li.level--6 .vxe-checkbox--icon {
831
+ .vxe-table-custom--panel-list > li.level--6 .vxe-checkbox--icon {
844
832
  left: 5.8em;
845
833
  }
846
- .vxe-table-custom--header > li.level--7,
847
- .vxe-table-custom--body > li.level--7 {
834
+ .vxe-table-custom--panel-list > li.level--7 {
848
835
  padding-left: 8.5em;
849
836
  }
850
- .vxe-table-custom--header > li.level--7 .vxe-checkbox--icon,
851
- .vxe-table-custom--body > li.level--7 .vxe-checkbox--icon {
837
+ .vxe-table-custom--panel-list > li.level--7 .vxe-checkbox--icon {
852
838
  left: 6.8em;
853
839
  }
854
- .vxe-table-custom--header > li.level--8,
855
- .vxe-table-custom--body > li.level--8 {
840
+ .vxe-table-custom--panel-list > li.level--8 {
856
841
  padding-left: 9.5em;
857
842
  }
858
- .vxe-table-custom--header > li.level--8 .vxe-checkbox--icon,
859
- .vxe-table-custom--body > li.level--8 .vxe-checkbox--icon {
843
+ .vxe-table-custom--panel-list > li.level--8 .vxe-checkbox--icon {
860
844
  left: 7.8em;
861
845
  }
862
846
 
@@ -870,20 +854,21 @@
870
854
  user-select: none;
871
855
  }
872
856
 
873
- .vxe-table-custom--body {
857
+ .vxe-table-custom--panel-list {
874
858
  padding: 0.2em 0;
875
859
  }
876
- .vxe-table-custom--body .vxe-table-custom--checkbox-option:hover {
860
+ .vxe-table-custom--panel-list .vxe-table-custom--checkbox-option:hover {
877
861
  background-color: var(--vxe-ui-table-row-hover-background-color);
878
862
  }
879
863
 
880
- .vxe-table-custom--footer {
864
+ .vxe-table-custom--footer-buttons {
865
+ width: 100%;
881
866
  display: flex;
882
867
  flex-direction: row;
883
868
  flex-shrink: 0;
884
869
  border-top: 1px solid var(--vxe-ui-base-popup-border-color);
885
870
  }
886
- .vxe-table-custom--footer button {
871
+ .vxe-table-custom--footer-buttons button {
887
872
  flex-grow: 1;
888
873
  height: 2.8em;
889
874
  }
@@ -1157,6 +1142,26 @@
1157
1142
  cursor: help;
1158
1143
  }
1159
1144
 
1145
+ .vxe-table-custom-popup--table-col-seq {
1146
+ width: 80px;
1147
+ }
1148
+
1149
+ .vxe-table-custom-popup--table-col-sort {
1150
+ width: 80px;
1151
+ }
1152
+
1153
+ .vxe-table-custom-popup--table-col-title {
1154
+ min-width: 120px;
1155
+ }
1156
+
1157
+ .vxe-table-custom-popup--table-col-width {
1158
+ width: 140px;
1159
+ }
1160
+
1161
+ .vxe-table-custom-popup--table-col-fixed {
1162
+ width: 200px;
1163
+ }
1164
+
1160
1165
  .vxe-table-export--panel-column > ul {
1161
1166
  list-style-type: none;
1162
1167
  overflow: auto;