vxe-table 3.8.8-beta.2 → 3.8.8-beta.4

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 (91) hide show
  1. package/lib/custom/src/mixin.js +19 -1
  2. package/lib/custom/src/mixin.min.js +1 -1
  3. package/lib/custom/src/panel.js +217 -94
  4. package/lib/custom/src/panel.min.js +1 -1
  5. package/lib/custom/style/style.css +86 -21
  6. package/lib/custom/style/style.min.css +1 -1
  7. package/lib/export/src/mixin.js +18 -0
  8. package/lib/export/src/mixin.min.js +1 -1
  9. package/lib/icon/style/{iconfont.1717485750049.ttf → iconfont.1717666909963.ttf} +0 -0
  10. package/lib/icon/style/iconfont.1717666909963.woff +0 -0
  11. package/lib/icon/style/iconfont.1717666909963.woff2 +0 -0
  12. package/lib/icon/style/style.css +124 -4
  13. package/lib/icon/style/style.min.css +124 -4
  14. package/lib/{iconfont.1717485750049.ttf → iconfont.1717666909963.ttf} +0 -0
  15. package/lib/iconfont.1717666909963.woff +0 -0
  16. package/lib/iconfont.1717666909963.woff2 +0 -0
  17. package/lib/index.css +1 -1
  18. package/lib/index.umd.js +280 -107
  19. package/lib/index.umd.min.js +1 -1
  20. package/lib/locale/lang/en-US.js +2 -1
  21. package/lib/locale/lang/en-US.min.js +1 -1
  22. package/lib/locale/lang/en-US.umd.js +2 -1
  23. package/lib/locale/lang/es-ES.js +2 -1
  24. package/lib/locale/lang/es-ES.min.js +1 -1
  25. package/lib/locale/lang/es-ES.umd.js +2 -1
  26. package/lib/locale/lang/ja-JP.js +2 -1
  27. package/lib/locale/lang/ja-JP.min.js +1 -1
  28. package/lib/locale/lang/ja-JP.umd.js +2 -1
  29. package/lib/locale/lang/pt-BR.js +2 -1
  30. package/lib/locale/lang/pt-BR.min.js +1 -1
  31. package/lib/locale/lang/pt-BR.umd.js +2 -1
  32. package/lib/locale/lang/zh-CN.js +2 -1
  33. package/lib/locale/lang/zh-CN.min.js +1 -1
  34. package/lib/locale/lang/zh-CN.umd.js +2 -1
  35. package/lib/locale/lang/zh-HK.min.js +1 -1
  36. package/lib/locale/lang/zh-HK.umd.js +2 -1
  37. package/lib/locale/lang/zh-MO.min.js +1 -1
  38. package/lib/locale/lang/zh-MO.umd.js +2 -1
  39. package/lib/locale/lang/zh-TC.js +2 -1
  40. package/lib/locale/lang/zh-TC.min.js +1 -1
  41. package/lib/locale/lang/zh-TC.umd.js +2 -1
  42. package/lib/locale/lang/zh-TW.min.js +1 -1
  43. package/lib/locale/lang/zh-TW.umd.js +2 -1
  44. package/lib/pager/src/pager.js +1 -1
  45. package/lib/pager/src/pager.min.js +1 -1
  46. package/lib/style.css +1 -1
  47. package/lib/style.min.css +1 -1
  48. package/lib/table/src/columnInfo.js +2 -0
  49. package/lib/table/src/columnInfo.min.js +1 -1
  50. package/lib/table/src/methods.js +8 -2
  51. package/lib/table/src/methods.min.js +1 -1
  52. package/lib/table/src/table.js +4 -1
  53. package/lib/table/src/table.min.js +1 -1
  54. package/lib/tools/log.js +1 -1
  55. package/lib/tools/log.min.js +1 -1
  56. package/lib/v-x-e-table/index.js +1 -1
  57. package/lib/v-x-e-table/index.min.js +1 -1
  58. package/lib/v-x-e-table/src/conf.js +7 -5
  59. package/lib/v-x-e-table/src/conf.min.js +1 -1
  60. package/lib/v-x-e-table/style/style.css +124 -4
  61. package/lib/v-x-e-table/style/style.min.css +1 -1
  62. package/lib/vxe-icon/style/style.css +124 -4
  63. package/lib/vxe-icon/style/style.min.css +1 -1
  64. package/lib/vxe-table-custom-module/style/style.css +86 -21
  65. package/lib/vxe-table-custom-module/style/style.min.css +1 -1
  66. package/package.json +1 -1
  67. package/packages/custom/src/mixin.js +17 -1
  68. package/packages/custom/src/panel.js +349 -196
  69. package/packages/export/src/mixin.js +17 -0
  70. package/packages/locale/lang/en-US.js +2 -1
  71. package/packages/locale/lang/es-ES.js +2 -1
  72. package/packages/locale/lang/ja-JP.js +2 -1
  73. package/packages/locale/lang/pt-BR.js +2 -1
  74. package/packages/locale/lang/zh-CN.js +2 -1
  75. package/packages/locale/lang/zh-TC.js +2 -1
  76. package/packages/pager/src/pager.js +1 -1
  77. package/packages/table/src/columnInfo.js +3 -0
  78. package/packages/table/src/methods.js +5 -2
  79. package/packages/table/src/table.js +4 -1
  80. package/packages/v-x-e-table/src/conf.js +9 -7
  81. package/styles/custom.scss +86 -8
  82. package/styles/icon/iconfont.ttf +0 -0
  83. package/styles/icon/iconfont.woff +0 -0
  84. package/styles/icon/iconfont.woff2 +0 -0
  85. package/styles/icon.scss +124 -4
  86. package/styles/old-icon.scss +2 -2
  87. package/styles/variable.scss +1 -0
  88. package/lib/icon/style/iconfont.1717485750049.woff +0 -0
  89. package/lib/icon/style/iconfont.1717485750049.woff2 +0 -0
  90. package/lib/iconfont.1717485750049.woff +0 -0
  91. package/lib/iconfont.1717485750049.woff2 +0 -0
package/lib/index.umd.js CHANGED
@@ -11146,6 +11146,7 @@ var iconPrefix = 'vxe-icon-';
11146
11146
  // },
11147
11147
  customConfig: {
11148
11148
  allowFixed: true,
11149
+ allowSort: true,
11149
11150
  showFooter: true
11150
11151
  // storage: false,
11151
11152
  // checkMethod () {}
@@ -11248,11 +11249,12 @@ var iconPrefix = 'vxe-icon-';
11248
11249
  TABLE_EXPAND_LOADED: iconPrefix + 'spinner roll',
11249
11250
  TABLE_EXPAND_OPEN: iconPrefix + 'arrow-right rotate90',
11250
11251
  TABLE_EXPAND_CLOSE: iconPrefix + 'arrow-right',
11251
- TABLE_CHECKBOX_CHECKED: iconPrefix + 'checkbox-checked',
11252
+ TABLE_CHECKBOX_CHECKED: iconPrefix + 'checkbox-checked-fill',
11252
11253
  TABLE_CHECKBOX_UNCHECKED: iconPrefix + 'checkbox-unchecked',
11253
- TABLE_CHECKBOX_INDETERMINATE: iconPrefix + 'checkbox-indeterminate',
11254
- TABLE_RADIO_CHECKED: iconPrefix + 'radio-checked',
11254
+ TABLE_CHECKBOX_INDETERMINATE: iconPrefix + 'checkbox-indeterminate-fill',
11255
+ TABLE_RADIO_CHECKED: iconPrefix + 'radio-checked-fill',
11255
11256
  TABLE_RADIO_UNCHECKED: iconPrefix + 'radio-unchecked',
11257
+ TABLE_CUSTOM_SORT: iconPrefix + 'drag-handle',
11256
11258
  // button
11257
11259
  BUTTON_DROPDOWN: iconPrefix + 'arrow-down',
11258
11260
  BUTTON_LOADING: iconPrefix + 'spinner roll',
@@ -11296,9 +11298,9 @@ var iconPrefix = 'vxe-icon-';
11296
11298
  TOOLBAR_TOOLS_MINIMIZE: iconPrefix + 'minimize',
11297
11299
  TOOLBAR_TOOLS_CUSTOM: iconPrefix + 'custom-column',
11298
11300
  TOOLBAR_TOOLS_FIXED_LEFT: iconPrefix + 'fixed-left',
11299
- TOOLBAR_TOOLS_FIXED_LEFT_ACTIVED: iconPrefix + 'fixed-left-fill',
11301
+ TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE: iconPrefix + 'fixed-left-fill',
11300
11302
  TOOLBAR_TOOLS_FIXED_RIGHT: iconPrefix + 'fixed-right',
11301
- TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVED: iconPrefix + 'fixed-right-fill',
11303
+ TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE: iconPrefix + 'fixed-right-fill',
11302
11304
  // form
11303
11305
  FORM_PREFIX: iconPrefix + 'question-circle-fill',
11304
11306
  FORM_SUFFIX: iconPrefix + 'question-circle-fill',
@@ -11479,7 +11481,7 @@ var es_array_concat = __webpack_require__(8706);
11479
11481
 
11480
11482
 
11481
11483
  function getLog(message, params) {
11482
- return "[vxe-table v".concat("3.8.8-beta.2", "] ").concat(conf.i18n(message, params));
11484
+ return "[vxe-table v".concat("3.8.8-beta.4", "] ").concat(conf.i18n(message, params));
11483
11485
  }
11484
11486
  function outLog(type) {
11485
11487
  return function (message, params) {
@@ -13159,7 +13161,7 @@ function setIcon(options) {
13159
13161
  var globalStore = {};
13160
13162
  var VXETable = {
13161
13163
  v: v,
13162
- version: "3.8.8-beta.2",
13164
+ version: "3.8.8-beta.4",
13163
13165
  reg: reg,
13164
13166
  use: use,
13165
13167
  setConfig: setConfig,
@@ -13289,6 +13291,8 @@ var ColumnInfo = /*#__PURE__*/function () {
13289
13291
  renderSortNumber: 0,
13290
13292
  // 用于记录自定义列顺序
13291
13293
 
13294
+ renderFixed: '',
13295
+ renderVisible: false,
13292
13296
  renderWidth: 0,
13293
13297
  renderHeight: 0,
13294
13298
  resizeWidth: 0,
@@ -18489,13 +18493,19 @@ var Methods = {
18489
18493
  var id = this.id,
18490
18494
  customConfig = this.customConfig,
18491
18495
  customOpts = this.customOpts;
18492
- var storage = customOpts.storage;
18496
+ var storage = customOpts.storage,
18497
+ restoreStore = customOpts.restoreStore;
18493
18498
  var isAllStorage = storage === true;
18494
18499
  var storageOpts = isAllStorage ? {} : Object.assign({}, storage || {});
18495
18500
  var isCustomResizable = isAllStorage || storageOpts.resizable;
18496
18501
  var isCustomVisible = isAllStorage || storageOpts.visible;
18497
18502
  var isCustomFixed = isAllStorage || storageOpts.fixed;
18498
18503
  var isCustomSort = isAllStorage || storageOpts.sort;
18504
+ if (storage && id && restoreStore) {
18505
+ restoreStore({
18506
+ id: id
18507
+ });
18508
+ }
18499
18509
  if (customConfig && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
18500
18510
  var customMap = {};
18501
18511
  if (!id) {
@@ -22921,7 +22931,7 @@ var Methods = {
22921
22931
  };
22922
22932
 
22923
22933
  // Module methods
22924
- var funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,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,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom'.split(',');
22934
+ var funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,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,openPrint,getPrintHtml,exportData,openImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom'.split(',');
22925
22935
  funcs.forEach(function (name) {
22926
22936
  Methods[name] = function () {
22927
22937
  if (false) {}
@@ -23480,7 +23490,10 @@ function handleUupdateResize(_vm) {
23480
23490
  activeBtn: false,
23481
23491
  activeWrapper: false,
23482
23492
  visible: false,
23483
- maxHeight: 0
23493
+ maxHeight: 0,
23494
+ oldSortMaps: {},
23495
+ oldFixedMaps: {},
23496
+ oldVisibleMaps: {}
23484
23497
  },
23485
23498
  // 当前选中的筛选列
23486
23499
  filterStore: {
@@ -33529,6 +33542,24 @@ var convertToRows = function convertToRows(originColumns) {
33529
33542
  }
33530
33543
  });
33531
33544
  },
33545
+ _getPrintHtml: function _getPrintHtml(options) {
33546
+ var printOpts = this.printOpts;
33547
+ var opts = Object.assign({
33548
+ original: false
33549
+ // beforePrintMethod
33550
+ }, printOpts, options, {
33551
+ type: 'html',
33552
+ download: false,
33553
+ remote: false,
33554
+ print: true
33555
+ });
33556
+ return this.exportData(opts).then(function (_ref4) {
33557
+ var content = _ref4.content;
33558
+ return {
33559
+ html: content
33560
+ };
33561
+ });
33562
+ },
33532
33563
  _openImport: function _openImport(options) {
33533
33564
  var defOpts = Object.assign({
33534
33565
  mode: 'insert',
@@ -34608,6 +34639,8 @@ var Validator = VxeTableValidatorModule;
34608
34639
  ;// CONCATENATED MODULE: ./packages/custom/src/mixin.js
34609
34640
 
34610
34641
 
34642
+
34643
+
34611
34644
  /* harmony default export */ var custom_src_mixin = ({
34612
34645
  methods: {
34613
34646
  _openCustom: function _openCustom() {
@@ -34615,9 +34648,25 @@ var Validator = VxeTableValidatorModule;
34615
34648
  var initStore = this.initStore,
34616
34649
  customStore = this.customStore,
34617
34650
  collectColumn = this.collectColumn;
34651
+ var sortMaps = {};
34652
+ var fixedMaps = {};
34653
+ var visibleMaps = {};
34654
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, function (column) {
34655
+ var colid = column.getKey();
34656
+ column.renderFixed = column.fixed;
34657
+ column.renderVisible = column.visible;
34658
+ sortMaps[colid] = column.renderSortNumber;
34659
+ fixedMaps[colid] = column.fixed;
34660
+ visibleMaps[colid] = column.visible;
34661
+ }, {
34662
+ children: 'children'
34663
+ });
34664
+ customStore.oldSortMaps = sortMaps;
34665
+ customStore.oldFixedMaps = fixedMaps;
34666
+ customStore.oldVisibleMaps = visibleMaps;
34667
+ this.customColumnList = collectColumn.slice(0);
34618
34668
  customStore.visible = true;
34619
34669
  initStore.custom = true;
34620
- this.customColumnList = collectColumn.slice(0);
34621
34670
  this.checkCustomStatus();
34622
34671
  this.calcMaxHeight();
34623
34672
  return this.$nextTick().then(function () {
@@ -34735,15 +34784,18 @@ function updateDropHint(_vm, evnt) {
34735
34784
  dragHintEl.style.left = "".concat(Math.min(wrapperEl.clientWidth - wrapperEl.scrollLeft - dragHintEl.clientWidth - 16, evnt.clientX - wrapperRect.x), "px");
34736
34785
  }
34737
34786
  }
34738
- function renderSimplePanel(h, _vm) {
34739
- var $xetable = _vm.$xetable,
34787
+ var renderSimplePanel = function renderSimplePanel(h, _vm) {
34788
+ var _e = _vm._e,
34789
+ $xetable = _vm.$xetable,
34740
34790
  customStore = _vm.customStore;
34741
- var customOpts = $xetable.customOpts,
34742
- customColumnList = $xetable.customColumnList,
34791
+ var customColumnList = $xetable.customColumnList,
34792
+ customOpts = $xetable.customOpts,
34743
34793
  isMaxFixedColumn = $xetable.isMaxFixedColumn;
34744
34794
  var maxHeight = customStore.maxHeight;
34745
34795
  var checkMethod = customOpts.checkMethod,
34746
34796
  visibleMethod = customOpts.visibleMethod,
34797
+ allowSort = customOpts.allowSort,
34798
+ allowFixed = customOpts.allowFixed,
34747
34799
  trigger = customOpts.trigger;
34748
34800
  var colVNs = [];
34749
34801
  var customWrapperOns = {};
@@ -34757,7 +34809,7 @@ function renderSimplePanel(h, _vm) {
34757
34809
  column: column
34758
34810
  }) : true;
34759
34811
  if (isVisible) {
34760
- var isChecked = column.visible;
34812
+ var isChecked = column.renderVisible;
34761
34813
  var isIndeterminate = column.halfVisible;
34762
34814
  var isColGroup = column.children && column.children.length;
34763
34815
  var colTitle = panel_formatText(column.getTitle(), 1);
@@ -34766,16 +34818,26 @@ function renderSimplePanel(h, _vm) {
34766
34818
  }) : false;
34767
34819
  colVNs.push(h('li', {
34768
34820
  key: column.id,
34821
+ attrs: {
34822
+ colid: column.id
34823
+ },
34769
34824
  class: ['vxe-table-custom--option', "level--".concat(column.level), {
34770
34825
  'is--group': isColGroup
34771
- }]
34826
+ }],
34827
+ on: {
34828
+ dragstart: _vm.sortDragstartEvent,
34829
+ dragend: _vm.sortDragendEvent,
34830
+ dragover: _vm.sortDragoverEvent
34831
+ }
34772
34832
  }, [h('div', {
34773
- title: colTitle,
34774
34833
  class: ['vxe-table-custom--checkbox-option', {
34775
34834
  'is--checked': isChecked,
34776
34835
  'is--indeterminate': isIndeterminate,
34777
34836
  'is--disabled': isDisabled
34778
34837
  }],
34838
+ attrs: {
34839
+ title: conf.i18n('vxe.custom.setting.colVisible')
34840
+ },
34779
34841
  on: {
34780
34842
  click: function click() {
34781
34843
  if (!isDisabled) {
@@ -34785,17 +34847,33 @@ function renderSimplePanel(h, _vm) {
34785
34847
  }
34786
34848
  }, [h('span', {
34787
34849
  class: ['vxe-checkbox--icon', isIndeterminate ? conf.icon.TABLE_CHECKBOX_INDETERMINATE : isChecked ? conf.icon.TABLE_CHECKBOX_CHECKED : conf.icon.TABLE_CHECKBOX_UNCHECKED]
34788
- }), h('span', {
34789
- class: 'vxe-checkbox--label'
34790
- }, colTitle)]), !parent && customOpts.allowFixed ? h('div', {
34850
+ })]), allowSort && column.level === 1 ? h('div', {
34851
+ class: 'vxe-table-custom--sort-option'
34852
+ }, [h('span', {
34853
+ class: 'vxe-table-custom--sort-btn',
34854
+ attrs: {
34855
+ title: conf.i18n('vxe.custom.setting.sortHelpTip')
34856
+ },
34857
+ on: {
34858
+ mousedown: _vm.sortMousedownEvent,
34859
+ mouseup: _vm.sortMouseupEvent
34860
+ }
34861
+ }, [h('i', {
34862
+ class: conf.icon.TABLE_CUSTOM_SORT
34863
+ })])]) : _e(), h('div', {
34864
+ class: 'vxe-table-custom--checkbox-label',
34865
+ attrs: {
34866
+ title: colTitle
34867
+ }
34868
+ }, colTitle), !parent && allowFixed ? h('div', {
34791
34869
  class: 'vxe-table-custom--fixed-option'
34792
34870
  }, [h('span', {
34793
- class: ['vxe-table-custom--fixed-left-option', column.fixed === 'left' ? conf.icon.TOOLBAR_TOOLS_FIXED_LEFT_ACTIVED : conf.icon.TOOLBAR_TOOLS_FIXED_LEFT, {
34794
- 'is--checked': column.fixed === 'left',
34795
- 'is--disabled': isMaxFixedColumn && !column.fixed
34871
+ class: ['vxe-table-custom--fixed-left-option', column.renderFixed === 'left' ? conf.icon.TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : conf.icon.TOOLBAR_TOOLS_FIXED_LEFT, {
34872
+ 'is--checked': column.renderFixed === 'left',
34873
+ 'is--disabled': isMaxFixedColumn && !column.renderFixed
34796
34874
  }],
34797
34875
  attrs: {
34798
- title: conf.i18n(column.fixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft')
34876
+ title: conf.i18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft')
34799
34877
  },
34800
34878
  on: {
34801
34879
  click: function click() {
@@ -34803,19 +34881,19 @@ function renderSimplePanel(h, _vm) {
34803
34881
  }
34804
34882
  }
34805
34883
  }), h('span', {
34806
- class: ['vxe-table-custom--fixed-right-option', column.fixed === 'right' ? conf.icon.TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVED : conf.icon.TOOLBAR_TOOLS_FIXED_RIGHT, {
34807
- 'is--checked': column.fixed === 'right',
34808
- 'is--disabled': isMaxFixedColumn && !column.fixed
34884
+ class: ['vxe-table-custom--fixed-right-option', column.renderFixed === 'right' ? conf.icon.TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : conf.icon.TOOLBAR_TOOLS_FIXED_RIGHT, {
34885
+ 'is--checked': column.renderFixed === 'right',
34886
+ 'is--disabled': isMaxFixedColumn && !column.renderFixed
34809
34887
  }],
34810
34888
  attrs: {
34811
- title: conf.i18n(column.fixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight')
34889
+ title: conf.i18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight')
34812
34890
  },
34813
34891
  on: {
34814
34892
  click: function click() {
34815
34893
  _vm.changeFixedOption(column, 'right');
34816
34894
  }
34817
34895
  }
34818
- })]) : null]));
34896
+ })]) : _e()]));
34819
34897
  }
34820
34898
  });
34821
34899
  var isAllChecked = customStore.isAll;
@@ -34825,7 +34903,7 @@ function renderSimplePanel(h, _vm) {
34825
34903
  class: ['vxe-table-custom-wrapper', {
34826
34904
  'is--active': customStore.visible
34827
34905
  }]
34828
- }, [h('ul', {
34906
+ }, customStore.visible ? [h('ul', {
34829
34907
  class: 'vxe-table-custom--header'
34830
34908
  }, [h('li', {
34831
34909
  class: 'vxe-table-custom--option'
@@ -34844,34 +34922,52 @@ function renderSimplePanel(h, _vm) {
34844
34922
  class: ['vxe-checkbox--icon', isAllIndeterminate ? conf.icon.TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? conf.icon.TABLE_CHECKBOX_CHECKED : conf.icon.TABLE_CHECKBOX_UNCHECKED]
34845
34923
  }), h('span', {
34846
34924
  class: 'vxe-checkbox--label'
34847
- }, conf.i18n('vxe.toolbar.customAll'))])])]), h('ul', {
34925
+ }, conf.i18n('vxe.toolbar.customAll'))])])]), h('div', {
34926
+ ref: 'bodyElemRef',
34927
+ class: 'vxe-table-custom--list-wrapper'
34928
+ }, [h('transition-group', {
34848
34929
  class: 'vxe-table-custom--body',
34930
+ props: {
34931
+ name: 'vxe-table-custom--list',
34932
+ tag: 'ul'
34933
+ },
34849
34934
  style: maxHeight ? {
34850
34935
  maxHeight: "".concat(maxHeight, "px")
34851
34936
  } : {},
34852
34937
  on: customWrapperOns
34853
- }, colVNs), customOpts.showFooter ? h('div', {
34938
+ }, colVNs), h('div', {
34939
+ ref: 'dragHintElemRef',
34940
+ class: 'vxe-table-custom-popup--drag-hint'
34941
+ }, conf.i18n('vxe.custom.cstmDragTarget', [_vm.dragColumn ? _vm.dragColumn.getTitle() : '']))]), customOpts.showFooter ? h('div', {
34854
34942
  class: 'vxe-table-custom--footer'
34855
34943
  }, [h('button', {
34856
34944
  class: 'btn--reset',
34857
34945
  on: {
34858
34946
  click: _vm.resetCustomEvent
34859
34947
  }
34860
- }, customOpts.resetButtonText || conf.i18n('vxe.toolbar.customRestore')), h('button', {
34948
+ }, customOpts.resetButtonText || conf.i18n('vxe.table.customRestore')), customOpts.immediate ? _e() : h('button', {
34949
+ class: 'btn--cancel',
34950
+ on: {
34951
+ click: _vm.cancelCustomEvent
34952
+ }
34953
+ }, customOpts.resetButtonText || conf.i18n('vxe.table.customCancel')), h('button', {
34861
34954
  class: 'btn--confirm',
34862
34955
  on: {
34863
34956
  click: _vm.confirmCustomEvent
34864
34957
  }
34865
- }, customOpts.confirmButtonText || conf.i18n('vxe.toolbar.customConfirm'))]) : null]);
34866
- }
34867
- function renderPopupPanel(h, _vm) {
34868
- var $xetable = _vm.$xetable,
34958
+ }, customOpts.confirmButtonText || conf.i18n('vxe.table.customConfirm'))]) : null] : []);
34959
+ };
34960
+ var renderPopupPanel = function renderPopupPanel(h, _vm) {
34961
+ var _e = _vm._e,
34962
+ $xetable = _vm.$xetable,
34869
34963
  customStore = _vm.customStore;
34870
34964
  var customOpts = $xetable.customOpts,
34871
34965
  customColumnList = $xetable.customColumnList,
34872
34966
  columnOpts = $xetable.columnOpts,
34873
34967
  isMaxFixedColumn = $xetable.isMaxFixedColumn;
34874
- var checkMethod = customOpts.checkMethod,
34968
+ var allowSort = customOpts.allowSort,
34969
+ allowFixed = customOpts.allowFixed,
34970
+ checkMethod = customOpts.checkMethod,
34875
34971
  visibleMethod = customOpts.visibleMethod;
34876
34972
  var trVNs = [];
34877
34973
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, function (column, index, items, path, parent) {
@@ -34879,7 +34975,7 @@ function renderPopupPanel(h, _vm) {
34879
34975
  column: column
34880
34976
  }) : true;
34881
34977
  if (isVisible) {
34882
- var isChecked = column.visible;
34978
+ var isChecked = column.renderVisible;
34883
34979
  var isIndeterminate = column.halfVisible;
34884
34980
  var colTitle = panel_formatText(column.getTitle(), 1);
34885
34981
  var isColGroup = column.children && column.children.length;
@@ -34888,35 +34984,18 @@ function renderPopupPanel(h, _vm) {
34888
34984
  }) : false;
34889
34985
  trVNs.push(h('tr', {
34890
34986
  key: column.id,
34891
- class: ["vxe-table-custom-popup--row level--".concat(column.level), {
34892
- 'is--group': isColGroup
34893
- }],
34894
34987
  attrs: {
34895
34988
  colid: column.id
34896
34989
  },
34990
+ class: ["vxe-table-custom-popup--row level--".concat(column.level), {
34991
+ 'is--group': isColGroup
34992
+ }],
34897
34993
  on: {
34898
34994
  dragstart: _vm.sortDragstartEvent,
34899
34995
  dragend: _vm.sortDragendEvent,
34900
34996
  dragover: _vm.sortDragoverEvent
34901
34997
  }
34902
34998
  }, [h('td', {
34903
- class: 'vxe-table-custom-popup--column-item col--sort'
34904
- }, [column.level === 1 ? h('span', {
34905
- class: 'vxe-table-custom-popup--column-sort-btn',
34906
- on: {
34907
- mousedown: _vm.sortMousedownEvent,
34908
- mouseup: _vm.sortMouseupEvent
34909
- }
34910
- }, [h('i', {
34911
- class: 'vxe-icon-sort'
34912
- })]) : null]), h('td', {
34913
- class: 'vxe-table-custom-popup--column-item col--name'
34914
- }, [h('div', {
34915
- class: 'vxe-table-custom-popup--name',
34916
- attrs: {
34917
- title: colTitle
34918
- }
34919
- }, colTitle)]), h('td', {
34920
34999
  class: 'vxe-table-custom-popup--column-item col--visible'
34921
35000
  }, [h('div', {
34922
35001
  class: ['vxe-table-custom--checkbox-option', {
@@ -34924,6 +35003,9 @@ function renderPopupPanel(h, _vm) {
34924
35003
  'is--indeterminate': isIndeterminate,
34925
35004
  'is--disabled': isDisabled
34926
35005
  }],
35006
+ attrs: {
35007
+ title: conf.i18n('vxe.custom.setting.colVisible')
35008
+ },
34927
35009
  on: {
34928
35010
  click: function click() {
34929
35011
  if (!isDisabled) {
@@ -34933,11 +35015,31 @@ function renderPopupPanel(h, _vm) {
34933
35015
  }
34934
35016
  }, [h('span', {
34935
35017
  class: ['vxe-checkbox--icon', isIndeterminate ? conf.icon.TABLE_CHECKBOX_INDETERMINATE : isChecked ? conf.icon.TABLE_CHECKBOX_CHECKED : conf.icon.TABLE_CHECKBOX_UNCHECKED]
34936
- })])]), h('td', {
35018
+ })])]), allowSort ? h('td', {
35019
+ class: 'vxe-table-custom-popup--column-item col--sort'
35020
+ }, [column.level === 1 ? h('span', {
35021
+ class: 'vxe-table-custom-popup--column-sort-btn',
35022
+ attrs: {
35023
+ title: conf.i18n('vxe.custom.setting.sortHelpTip')
35024
+ },
35025
+ on: {
35026
+ mousedown: _vm.sortMousedownEvent,
35027
+ mouseup: _vm.sortMouseupEvent
35028
+ }
35029
+ }, [h('i', {
35030
+ class: conf.icon.TABLE_CUSTOM_SORT
35031
+ })]) : null]) : _e(), h('td', {
35032
+ class: 'vxe-table-custom-popup--column-item col--name'
35033
+ }, [h('div', {
35034
+ class: 'vxe-table-custom-popup--name',
35035
+ attrs: {
35036
+ title: colTitle
35037
+ }
35038
+ }, colTitle)]), allowFixed ? h('td', {
34937
35039
  class: 'vxe-table-custom-popup--column-item col--fixed'
34938
- }, [!parent && customOpts.allowFixed ? h('vxe-radio-group', {
35040
+ }, [!parent ? h('vxe-radio-group', {
34939
35041
  props: {
34940
- value: column.fixed || '',
35042
+ value: column.renderFixed || '',
34941
35043
  type: 'button',
34942
35044
  size: 'mini',
34943
35045
  options: [{
@@ -34955,21 +35057,22 @@ function renderPopupPanel(h, _vm) {
34955
35057
  },
34956
35058
  on: {
34957
35059
  input: function input(value) {
34958
- column.fixed = value;
34959
- },
34960
- change: function change() {
34961
- _vm.changePopupFixedOption(column);
34962
- }
35060
+ column.renderFixed = value;
35061
+ } // onChange () {
35062
+ // changePopupFixedOption(column)
35063
+ // }
34963
35064
  }
34964
- }) : null])]));
35065
+ }) : null]) : _e()]));
34965
35066
  }
34966
35067
  });
35068
+ var isAllChecked = customStore.isAll;
35069
+ var isAllIndeterminate = customStore.isIndeterminate;
34967
35070
  return h('vxe-modal', {
34968
35071
  key: 'popup',
34969
35072
  props: {
35073
+ className: 'vxe-table-custom-popup-wrapper vxe-table--ignore-clear',
34970
35074
  value: customStore.visible,
34971
35075
  title: conf.i18n('vxe.custom.cstmTitle'),
34972
- className: 'vxe-table-custom-popup-wrapper vxe-table--ignore-clear',
34973
35076
  width: '40vw',
34974
35077
  minWidth: 520,
34975
35078
  height: '50vh',
@@ -34997,20 +35100,39 @@ function renderPopupPanel(h, _vm) {
34997
35100
  style: {
34998
35101
  width: '80px'
34999
35102
  }
35000
- }), h('col'), h('col', {
35103
+ }), allowSort ? h('col', {
35001
35104
  style: {
35002
35105
  width: '80px'
35003
35106
  }
35004
- }), h('col', {
35107
+ }) : _e(), h('col', {
35108
+ style: {
35109
+ minWidth: '120px'
35110
+ }
35111
+ }), allowFixed ? h('col', {
35005
35112
  style: {
35006
35113
  width: '200px'
35007
35114
  }
35008
- })]), h('thead', {}, [h('tr', {}, [h('th', {}, [h('span', {
35115
+ }) : _e()]), h('thead', {}, [h('tr', {}, [h('th', {}, [h('div', {
35116
+ class: ['vxe-table-custom--checkbox-option', {
35117
+ 'is--checked': isAllChecked,
35118
+ 'is--indeterminate': isAllIndeterminate
35119
+ }],
35120
+ attrs: {
35121
+ title: conf.i18n('vxe.table.allTitle')
35122
+ },
35123
+ on: {
35124
+ click: _vm.allCustomEvent
35125
+ }
35126
+ }, [h('span', {
35127
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? conf.icon.TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? conf.icon.TABLE_CHECKBOX_CHECKED : conf.icon.TABLE_CHECKBOX_UNCHECKED]
35128
+ }), h('span', {
35129
+ class: 'vxe-checkbox--label'
35130
+ }, conf.i18n('vxe.toolbar.customAll'))])]), allowSort ? h('th', {}, [h('span', {
35009
35131
  class: 'vxe-table-custom-popup--table-sort-help-title'
35010
35132
  }, conf.i18n('vxe.custom.setting.colSort')), h('vxe-tooltip', {
35011
35133
  props: {
35012
35134
  enterable: true,
35013
- content: '点击并拖动图标可以调整列的排序'
35135
+ content: conf.i18n('vxe.custom.setting.sortHelpTip')
35014
35136
  },
35015
35137
  scopedSlots: {
35016
35138
  default: function _default() {
@@ -35019,7 +35141,7 @@ function renderPopupPanel(h, _vm) {
35019
35141
  });
35020
35142
  }
35021
35143
  }
35022
- })]), h('th', {}, conf.i18n('vxe.custom.setting.colTitle')), h('th', {}, conf.i18n('vxe.custom.setting.colVisible')), h('th', {}, conf.i18n('vxe.custom.setting.colFixed', [columnOpts.maxFixedSize || 0]))])]), h('transition-group', {
35144
+ })]) : _e(), h('th', {}, conf.i18n('vxe.custom.setting.colTitle')), allowFixed ? h('th', {}, conf.i18n('vxe.custom.setting.colFixed', [columnOpts.maxFixedSize || 0])) : _e()])]), h('transition-group', {
35023
35145
  class: 'vxe-table-custom--body',
35024
35146
  props: {
35025
35147
  tag: 'tbody',
@@ -35038,7 +35160,7 @@ function renderPopupPanel(h, _vm) {
35038
35160
  content: customOpts.resetButtonText || conf.i18n('vxe.custom.cstmRestore')
35039
35161
  },
35040
35162
  on: {
35041
- click: _vm.resetPopupCustomEvent
35163
+ click: _vm.resetCustomEvent
35042
35164
  }
35043
35165
  }), h('vxe-button', {
35044
35166
  props: {
@@ -35059,7 +35181,7 @@ function renderPopupPanel(h, _vm) {
35059
35181
  }
35060
35182
  }
35061
35183
  });
35062
- }
35184
+ };
35063
35185
  /* harmony default export */ var custom_src_panel = ({
35064
35186
  name: 'VxeTableCustomPanel',
35065
35187
  props: {
@@ -35106,23 +35228,66 @@ function renderPopupPanel(h, _vm) {
35106
35228
  }
35107
35229
  }, 300);
35108
35230
  },
35231
+ getStoreData: function getStoreData() {
35232
+ return {};
35233
+ },
35234
+ handleSaveStore: function handleSaveStore(type) {
35235
+ var $xetable = this.$xetable;
35236
+ var id = $xetable.id,
35237
+ customOpts = $xetable.customOpts;
35238
+ var storage = customOpts.storage,
35239
+ updateStore = customOpts.updateStore;
35240
+ if (storage && id && updateStore) {
35241
+ updateStore({
35242
+ id: id,
35243
+ type: type,
35244
+ storeData: this.getStoreData()
35245
+ });
35246
+ }
35247
+ },
35109
35248
  confirmCustomEvent: function confirmCustomEvent(evnt) {
35110
35249
  var $xetable = this.$xetable;
35250
+ var customColumnList = $xetable.customColumnList;
35251
+ customColumnList.forEach(function (column, index) {
35252
+ var sortIndex = index + 1;
35253
+ column.renderSortNumber = sortIndex;
35254
+ column.fixed = column.renderFixed;
35255
+ column.visible = column.renderVisible;
35256
+ });
35111
35257
  $xetable.closeCustom();
35112
35258
  $xetable.emitCustomEvent('confirm', evnt);
35259
+ this.handleSaveStore('confirm');
35113
35260
  },
35114
35261
  cancelCustomEvent: function cancelCustomEvent(evnt) {
35115
35262
  var $xetable = this.$xetable;
35263
+ var customStore = $xetable.customStore,
35264
+ customColumnList = $xetable.customColumnList;
35265
+ var oldSortMaps = customStore.oldSortMaps,
35266
+ oldFixedMaps = customStore.oldFixedMaps,
35267
+ oldVisibleMaps = customStore.oldVisibleMaps;
35268
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, function (column) {
35269
+ var colid = column.getKey();
35270
+ var visible = !!oldVisibleMaps[colid];
35271
+ var fixed = oldFixedMaps[colid] || '';
35272
+ column.renderVisible = visible;
35273
+ column.visible = visible;
35274
+ column.renderFixed = fixed;
35275
+ column.fixed = fixed;
35276
+ column.renderSortNumber = oldSortMaps[colid] || 0;
35277
+ }, {
35278
+ children: 'children'
35279
+ });
35116
35280
  $xetable.closeCustom();
35117
35281
  $xetable.emitCustomEvent('cancel', evnt);
35118
35282
  },
35119
- resetCustomEvent: function resetCustomEvent(evnt) {
35283
+ handleResetCustomEvent: function handleResetCustomEvent(evnt) {
35120
35284
  var $xetable = this.$xetable;
35121
35285
  $xetable.resetColumn(true);
35122
35286
  $xetable.closeCustom();
35123
35287
  $xetable.emitCustomEvent('reset', evnt);
35288
+ this.handleSaveStore('confirm');
35124
35289
  },
35125
- resetPopupCustomEvent: function resetPopupCustomEvent(evnt) {
35290
+ resetCustomEvent: function resetCustomEvent(evnt) {
35126
35291
  var _this = this;
35127
35292
  if (v_x_e_table.modal) {
35128
35293
  v_x_e_table.modal.confirm({
@@ -35131,7 +35296,23 @@ function renderPopupPanel(h, _vm) {
35131
35296
  escClosable: true
35132
35297
  }).then(function (type) {
35133
35298
  if (type === 'confirm') {
35134
- _this.resetCustomEvent(evnt);
35299
+ _this.handleResetCustomEvent(evnt);
35300
+ }
35301
+ });
35302
+ } else {
35303
+ this.handleResetCustomEvent(evnt);
35304
+ }
35305
+ },
35306
+ resetPopupCustomEvent: function resetPopupCustomEvent(evnt) {
35307
+ var _this2 = this;
35308
+ if (v_x_e_table.modal) {
35309
+ v_x_e_table.modal.confirm({
35310
+ content: conf.i18n('vxe.custom.cstmConfirmRestore'),
35311
+ className: 'vxe-table--ignore-clear',
35312
+ escClosable: true
35313
+ }).then(function (type) {
35314
+ if (type === 'confirm') {
35315
+ _this2.resetCustomEvent(evnt);
35135
35316
  }
35136
35317
  });
35137
35318
  } else {
@@ -35160,9 +35341,9 @@ function renderPopupPanel(h, _vm) {
35160
35341
  changeCheckboxOption: function changeCheckboxOption(column) {
35161
35342
  var $xetable = this.$xetable;
35162
35343
  var customOpts = $xetable.customOpts;
35163
- var isChecked = !column.visible;
35344
+ var isChecked = !column.renderVisible;
35164
35345
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], function (item) {
35165
- item.visible = isChecked;
35346
+ item.renderVisible = isChecked;
35166
35347
  item.halfVisible = false;
35167
35348
  });
35168
35349
  this.handleOptionCheck(column);
@@ -35174,21 +35355,23 @@ function renderPopupPanel(h, _vm) {
35174
35355
  changeFixedOption: function changeFixedOption(column, colFixed) {
35175
35356
  var $xetable = this.$xetable;
35176
35357
  var isMaxFixedColumn = $xetable.isMaxFixedColumn;
35177
- if (column.fixed === colFixed) {
35178
- $xetable.clearColumnFixed(column);
35358
+ if (column.renderFixed === colFixed) {
35359
+ column.renderFixed = '';
35360
+ // $xeTable.clearColumnFixed(column)
35179
35361
  } else {
35180
- if (!isMaxFixedColumn || column.fixed) {
35181
- $xetable.setColumnFixed(column, colFixed);
35362
+ if (!isMaxFixedColumn || column.renderFixed) {
35363
+ column.renderFixed = colFixed;
35364
+ // $xeTable.setColumnFixed(column, colFixed)
35182
35365
  }
35183
35366
  }
35184
35367
  },
35185
- changePopupFixedOption: function changePopupFixedOption(column) {
35186
- var $xetable = this.$xetable;
35187
- var isMaxFixedColumn = $xetable.isMaxFixedColumn;
35188
- if (!isMaxFixedColumn) {
35189
- $xetable.setColumnFixed(column, column.fixed);
35190
- }
35191
- },
35368
+ // changePopupFixedOption (column) {
35369
+ // const { $xetable } = this
35370
+ // const { isMaxFixedColumn } = $xetable
35371
+ // if (!isMaxFixedColumn) {
35372
+ // $xetable.setColumnFixed(column, column.fixed)
35373
+ // }
35374
+ // },
35192
35375
  allCustomEvent: function allCustomEvent() {
35193
35376
  var $xetable = this.$xetable,
35194
35377
  customStore = this.customStore;
@@ -35200,7 +35383,7 @@ function renderPopupPanel(h, _vm) {
35200
35383
  if (!checkMethod || checkMethod({
35201
35384
  column: column
35202
35385
  })) {
35203
- column.visible = isAll;
35386
+ column.renderVisible = isAll;
35204
35387
  column.halfVisible = false;
35205
35388
  }
35206
35389
  });
@@ -35279,8 +35462,6 @@ function renderPopupPanel(h, _vm) {
35279
35462
  }
35280
35463
  panel_removeClass(trEl, 'active--drag-target');
35281
35464
  panel_removeClass(trEl, 'active--drag-origin');
35282
- // 更新顺序
35283
- this.updateColumnSort();
35284
35465
  },
35285
35466
  sortDragoverEvent: function sortDragoverEvent(evnt) {
35286
35467
  var $xetable = this.$xetable,
@@ -35301,15 +35482,6 @@ function renderPopupPanel(h, _vm) {
35301
35482
  this.prevDropTrEl = trEl;
35302
35483
  }
35303
35484
  updateDropHint(this, evnt);
35304
- },
35305
- updateColumnSort: function updateColumnSort() {
35306
- var $xetable = this.$xetable;
35307
- var customColumnList = $xetable.customColumnList;
35308
- // 更新顺序
35309
- customColumnList.forEach(function (column, index) {
35310
- var sortIndex = index + 1;
35311
- column.renderSortNumber = sortIndex;
35312
- });
35313
35485
  }
35314
35486
  }
35315
35487
  });
@@ -37605,7 +37777,7 @@ var Toolbar = VxeToolbar;
37605
37777
  renderEnd: function renderEnd(h) {
37606
37778
  return h('button', {
37607
37779
  class: ['vxe-pager--prev-btn', {
37608
- 'is--disabled': this.currentPage <= 1
37780
+ 'is--disabled': this.currentPage >= this.pageCount
37609
37781
  }],
37610
37782
  attrs: {
37611
37783
  type: 'button',
@@ -42044,7 +42216,8 @@ var Pulldown = VxePulldown;
42044
42216
  customTitle: '列设置',
42045
42217
  customAll: '全部',
42046
42218
  customConfirm: '确认',
42047
- customRestore: '重置',
42219
+ customCancel: '取消',
42220
+ customRestore: '恢复默认',
42048
42221
  maxFixedCol: '最大冻结列的数量不能超过 {0} 个'
42049
42222
  },
42050
42223
  grid: {