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

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 (87) 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/icon/style/{iconfont.1717485750049.ttf → iconfont.1717666158668.ttf} +0 -0
  8. package/lib/icon/style/iconfont.1717666158668.woff +0 -0
  9. package/lib/icon/style/iconfont.1717666158668.woff2 +0 -0
  10. package/lib/icon/style/style.css +124 -4
  11. package/lib/icon/style/style.min.css +124 -4
  12. package/lib/{iconfont.1717485750049.ttf → iconfont.1717666158668.ttf} +0 -0
  13. package/lib/iconfont.1717666158668.woff +0 -0
  14. package/lib/iconfont.1717666158668.woff2 +0 -0
  15. package/lib/index.css +1 -1
  16. package/lib/index.umd.js +261 -106
  17. package/lib/index.umd.min.js +1 -1
  18. package/lib/locale/lang/en-US.js +2 -1
  19. package/lib/locale/lang/en-US.min.js +1 -1
  20. package/lib/locale/lang/en-US.umd.js +2 -1
  21. package/lib/locale/lang/es-ES.js +2 -1
  22. package/lib/locale/lang/es-ES.min.js +1 -1
  23. package/lib/locale/lang/es-ES.umd.js +2 -1
  24. package/lib/locale/lang/ja-JP.js +2 -1
  25. package/lib/locale/lang/ja-JP.min.js +1 -1
  26. package/lib/locale/lang/ja-JP.umd.js +2 -1
  27. package/lib/locale/lang/pt-BR.js +2 -1
  28. package/lib/locale/lang/pt-BR.min.js +1 -1
  29. package/lib/locale/lang/pt-BR.umd.js +2 -1
  30. package/lib/locale/lang/zh-CN.js +2 -1
  31. package/lib/locale/lang/zh-CN.min.js +1 -1
  32. package/lib/locale/lang/zh-CN.umd.js +2 -1
  33. package/lib/locale/lang/zh-HK.min.js +1 -1
  34. package/lib/locale/lang/zh-HK.umd.js +2 -1
  35. package/lib/locale/lang/zh-MO.min.js +1 -1
  36. package/lib/locale/lang/zh-MO.umd.js +2 -1
  37. package/lib/locale/lang/zh-TC.js +2 -1
  38. package/lib/locale/lang/zh-TC.min.js +1 -1
  39. package/lib/locale/lang/zh-TC.umd.js +2 -1
  40. package/lib/locale/lang/zh-TW.min.js +1 -1
  41. package/lib/locale/lang/zh-TW.umd.js +2 -1
  42. package/lib/pager/src/pager.js +1 -1
  43. package/lib/pager/src/pager.min.js +1 -1
  44. package/lib/style.css +1 -1
  45. package/lib/style.min.css +1 -1
  46. package/lib/table/src/columnInfo.js +2 -0
  47. package/lib/table/src/columnInfo.min.js +1 -1
  48. package/lib/table/src/methods.js +7 -1
  49. package/lib/table/src/methods.min.js +1 -1
  50. package/lib/table/src/table.js +4 -1
  51. package/lib/table/src/table.min.js +1 -1
  52. package/lib/tools/log.js +1 -1
  53. package/lib/tools/log.min.js +1 -1
  54. package/lib/v-x-e-table/index.js +1 -1
  55. package/lib/v-x-e-table/index.min.js +1 -1
  56. package/lib/v-x-e-table/src/conf.js +7 -5
  57. package/lib/v-x-e-table/src/conf.min.js +1 -1
  58. package/lib/v-x-e-table/style/style.css +124 -4
  59. package/lib/v-x-e-table/style/style.min.css +1 -1
  60. package/lib/vxe-icon/style/style.css +124 -4
  61. package/lib/vxe-icon/style/style.min.css +1 -1
  62. package/lib/vxe-table-custom-module/style/style.css +86 -21
  63. package/lib/vxe-table-custom-module/style/style.min.css +1 -1
  64. package/package.json +1 -1
  65. package/packages/custom/src/mixin.js +17 -1
  66. package/packages/custom/src/panel.js +349 -196
  67. package/packages/locale/lang/en-US.js +2 -1
  68. package/packages/locale/lang/es-ES.js +2 -1
  69. package/packages/locale/lang/ja-JP.js +2 -1
  70. package/packages/locale/lang/pt-BR.js +2 -1
  71. package/packages/locale/lang/zh-CN.js +2 -1
  72. package/packages/locale/lang/zh-TC.js +2 -1
  73. package/packages/pager/src/pager.js +1 -1
  74. package/packages/table/src/columnInfo.js +3 -0
  75. package/packages/table/src/methods.js +4 -1
  76. package/packages/table/src/table.js +4 -1
  77. package/packages/v-x-e-table/src/conf.js +9 -7
  78. package/styles/custom.scss +86 -8
  79. package/styles/icon/iconfont.ttf +0 -0
  80. package/styles/icon/iconfont.woff +0 -0
  81. package/styles/icon/iconfont.woff2 +0 -0
  82. package/styles/icon.scss +124 -4
  83. package/styles/old-icon.scss +2 -2
  84. package/lib/icon/style/iconfont.1717485750049.woff +0 -0
  85. package/lib/icon/style/iconfont.1717485750049.woff2 +0 -0
  86. package/lib/iconfont.1717485750049.woff +0 -0
  87. 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.3", "] ").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.3",
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) {
@@ -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: {
@@ -34608,6 +34621,8 @@ var Validator = VxeTableValidatorModule;
34608
34621
  ;// CONCATENATED MODULE: ./packages/custom/src/mixin.js
34609
34622
 
34610
34623
 
34624
+
34625
+
34611
34626
  /* harmony default export */ var custom_src_mixin = ({
34612
34627
  methods: {
34613
34628
  _openCustom: function _openCustom() {
@@ -34615,9 +34630,25 @@ var Validator = VxeTableValidatorModule;
34615
34630
  var initStore = this.initStore,
34616
34631
  customStore = this.customStore,
34617
34632
  collectColumn = this.collectColumn;
34633
+ var sortMaps = {};
34634
+ var fixedMaps = {};
34635
+ var visibleMaps = {};
34636
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, function (column) {
34637
+ var colid = column.getKey();
34638
+ column.renderFixed = column.fixed;
34639
+ column.renderVisible = column.visible;
34640
+ sortMaps[colid] = column.renderSortNumber;
34641
+ fixedMaps[colid] = column.fixed;
34642
+ visibleMaps[colid] = column.visible;
34643
+ }, {
34644
+ children: 'children'
34645
+ });
34646
+ customStore.oldSortMaps = sortMaps;
34647
+ customStore.oldFixedMaps = fixedMaps;
34648
+ customStore.oldVisibleMaps = visibleMaps;
34649
+ this.customColumnList = collectColumn.slice(0);
34618
34650
  customStore.visible = true;
34619
34651
  initStore.custom = true;
34620
- this.customColumnList = collectColumn.slice(0);
34621
34652
  this.checkCustomStatus();
34622
34653
  this.calcMaxHeight();
34623
34654
  return this.$nextTick().then(function () {
@@ -34735,15 +34766,18 @@ function updateDropHint(_vm, evnt) {
34735
34766
  dragHintEl.style.left = "".concat(Math.min(wrapperEl.clientWidth - wrapperEl.scrollLeft - dragHintEl.clientWidth - 16, evnt.clientX - wrapperRect.x), "px");
34736
34767
  }
34737
34768
  }
34738
- function renderSimplePanel(h, _vm) {
34739
- var $xetable = _vm.$xetable,
34769
+ var renderSimplePanel = function renderSimplePanel(h, _vm) {
34770
+ var _e = _vm._e,
34771
+ $xetable = _vm.$xetable,
34740
34772
  customStore = _vm.customStore;
34741
- var customOpts = $xetable.customOpts,
34742
- customColumnList = $xetable.customColumnList,
34773
+ var customColumnList = $xetable.customColumnList,
34774
+ customOpts = $xetable.customOpts,
34743
34775
  isMaxFixedColumn = $xetable.isMaxFixedColumn;
34744
34776
  var maxHeight = customStore.maxHeight;
34745
34777
  var checkMethod = customOpts.checkMethod,
34746
34778
  visibleMethod = customOpts.visibleMethod,
34779
+ allowSort = customOpts.allowSort,
34780
+ allowFixed = customOpts.allowFixed,
34747
34781
  trigger = customOpts.trigger;
34748
34782
  var colVNs = [];
34749
34783
  var customWrapperOns = {};
@@ -34757,7 +34791,7 @@ function renderSimplePanel(h, _vm) {
34757
34791
  column: column
34758
34792
  }) : true;
34759
34793
  if (isVisible) {
34760
- var isChecked = column.visible;
34794
+ var isChecked = column.renderVisible;
34761
34795
  var isIndeterminate = column.halfVisible;
34762
34796
  var isColGroup = column.children && column.children.length;
34763
34797
  var colTitle = panel_formatText(column.getTitle(), 1);
@@ -34766,16 +34800,26 @@ function renderSimplePanel(h, _vm) {
34766
34800
  }) : false;
34767
34801
  colVNs.push(h('li', {
34768
34802
  key: column.id,
34803
+ attrs: {
34804
+ colid: column.id
34805
+ },
34769
34806
  class: ['vxe-table-custom--option', "level--".concat(column.level), {
34770
34807
  'is--group': isColGroup
34771
- }]
34808
+ }],
34809
+ on: {
34810
+ dragstart: _vm.sortDragstartEvent,
34811
+ dragend: _vm.sortDragendEvent,
34812
+ dragover: _vm.sortDragoverEvent
34813
+ }
34772
34814
  }, [h('div', {
34773
- title: colTitle,
34774
34815
  class: ['vxe-table-custom--checkbox-option', {
34775
34816
  'is--checked': isChecked,
34776
34817
  'is--indeterminate': isIndeterminate,
34777
34818
  'is--disabled': isDisabled
34778
34819
  }],
34820
+ attrs: {
34821
+ title: conf.i18n('vxe.custom.setting.colVisible')
34822
+ },
34779
34823
  on: {
34780
34824
  click: function click() {
34781
34825
  if (!isDisabled) {
@@ -34785,17 +34829,33 @@ function renderSimplePanel(h, _vm) {
34785
34829
  }
34786
34830
  }, [h('span', {
34787
34831
  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', {
34832
+ })]), allowSort && column.level === 1 ? h('div', {
34833
+ class: 'vxe-table-custom--sort-option'
34834
+ }, [h('span', {
34835
+ class: 'vxe-table-custom--sort-btn',
34836
+ attrs: {
34837
+ title: conf.i18n('vxe.custom.setting.sortHelpTip')
34838
+ },
34839
+ on: {
34840
+ mousedown: _vm.sortMousedownEvent,
34841
+ mouseup: _vm.sortMouseupEvent
34842
+ }
34843
+ }, [h('i', {
34844
+ class: conf.icon.TABLE_CUSTOM_SORT
34845
+ })])]) : _e(), h('div', {
34846
+ class: 'vxe-table-custom--checkbox-label',
34847
+ attrs: {
34848
+ title: colTitle
34849
+ }
34850
+ }, colTitle), !parent && allowFixed ? h('div', {
34791
34851
  class: 'vxe-table-custom--fixed-option'
34792
34852
  }, [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
34853
+ class: ['vxe-table-custom--fixed-left-option', column.renderFixed === 'left' ? conf.icon.TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : conf.icon.TOOLBAR_TOOLS_FIXED_LEFT, {
34854
+ 'is--checked': column.renderFixed === 'left',
34855
+ 'is--disabled': isMaxFixedColumn && !column.renderFixed
34796
34856
  }],
34797
34857
  attrs: {
34798
- title: conf.i18n(column.fixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft')
34858
+ title: conf.i18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft')
34799
34859
  },
34800
34860
  on: {
34801
34861
  click: function click() {
@@ -34803,19 +34863,19 @@ function renderSimplePanel(h, _vm) {
34803
34863
  }
34804
34864
  }
34805
34865
  }), 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
34866
+ class: ['vxe-table-custom--fixed-right-option', column.renderFixed === 'right' ? conf.icon.TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : conf.icon.TOOLBAR_TOOLS_FIXED_RIGHT, {
34867
+ 'is--checked': column.renderFixed === 'right',
34868
+ 'is--disabled': isMaxFixedColumn && !column.renderFixed
34809
34869
  }],
34810
34870
  attrs: {
34811
- title: conf.i18n(column.fixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight')
34871
+ title: conf.i18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight')
34812
34872
  },
34813
34873
  on: {
34814
34874
  click: function click() {
34815
34875
  _vm.changeFixedOption(column, 'right');
34816
34876
  }
34817
34877
  }
34818
- })]) : null]));
34878
+ })]) : _e()]));
34819
34879
  }
34820
34880
  });
34821
34881
  var isAllChecked = customStore.isAll;
@@ -34825,7 +34885,7 @@ function renderSimplePanel(h, _vm) {
34825
34885
  class: ['vxe-table-custom-wrapper', {
34826
34886
  'is--active': customStore.visible
34827
34887
  }]
34828
- }, [h('ul', {
34888
+ }, customStore.visible ? [h('ul', {
34829
34889
  class: 'vxe-table-custom--header'
34830
34890
  }, [h('li', {
34831
34891
  class: 'vxe-table-custom--option'
@@ -34844,34 +34904,52 @@ function renderSimplePanel(h, _vm) {
34844
34904
  class: ['vxe-checkbox--icon', isAllIndeterminate ? conf.icon.TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? conf.icon.TABLE_CHECKBOX_CHECKED : conf.icon.TABLE_CHECKBOX_UNCHECKED]
34845
34905
  }), h('span', {
34846
34906
  class: 'vxe-checkbox--label'
34847
- }, conf.i18n('vxe.toolbar.customAll'))])])]), h('ul', {
34907
+ }, conf.i18n('vxe.toolbar.customAll'))])])]), h('div', {
34908
+ ref: 'bodyElemRef',
34909
+ class: 'vxe-table-custom--list-wrapper'
34910
+ }, [h('transition-group', {
34848
34911
  class: 'vxe-table-custom--body',
34912
+ props: {
34913
+ name: 'vxe-table-custom--list',
34914
+ tag: 'ul'
34915
+ },
34849
34916
  style: maxHeight ? {
34850
34917
  maxHeight: "".concat(maxHeight, "px")
34851
34918
  } : {},
34852
34919
  on: customWrapperOns
34853
- }, colVNs), customOpts.showFooter ? h('div', {
34920
+ }, colVNs), h('div', {
34921
+ ref: 'dragHintElemRef',
34922
+ class: 'vxe-table-custom-popup--drag-hint'
34923
+ }, conf.i18n('vxe.custom.cstmDragTarget', [_vm.dragColumn ? _vm.dragColumn.getTitle() : '']))]), customOpts.showFooter ? h('div', {
34854
34924
  class: 'vxe-table-custom--footer'
34855
34925
  }, [h('button', {
34856
34926
  class: 'btn--reset',
34857
34927
  on: {
34858
34928
  click: _vm.resetCustomEvent
34859
34929
  }
34860
- }, customOpts.resetButtonText || conf.i18n('vxe.toolbar.customRestore')), h('button', {
34930
+ }, customOpts.resetButtonText || conf.i18n('vxe.table.customRestore')), customOpts.immediate ? _e() : h('button', {
34931
+ class: 'btn--cancel',
34932
+ on: {
34933
+ click: _vm.cancelCustomEvent
34934
+ }
34935
+ }, customOpts.resetButtonText || conf.i18n('vxe.table.customCancel')), h('button', {
34861
34936
  class: 'btn--confirm',
34862
34937
  on: {
34863
34938
  click: _vm.confirmCustomEvent
34864
34939
  }
34865
- }, customOpts.confirmButtonText || conf.i18n('vxe.toolbar.customConfirm'))]) : null]);
34866
- }
34867
- function renderPopupPanel(h, _vm) {
34868
- var $xetable = _vm.$xetable,
34940
+ }, customOpts.confirmButtonText || conf.i18n('vxe.table.customConfirm'))]) : null] : []);
34941
+ };
34942
+ var renderPopupPanel = function renderPopupPanel(h, _vm) {
34943
+ var _e = _vm._e,
34944
+ $xetable = _vm.$xetable,
34869
34945
  customStore = _vm.customStore;
34870
34946
  var customOpts = $xetable.customOpts,
34871
34947
  customColumnList = $xetable.customColumnList,
34872
34948
  columnOpts = $xetable.columnOpts,
34873
34949
  isMaxFixedColumn = $xetable.isMaxFixedColumn;
34874
- var checkMethod = customOpts.checkMethod,
34950
+ var allowSort = customOpts.allowSort,
34951
+ allowFixed = customOpts.allowFixed,
34952
+ checkMethod = customOpts.checkMethod,
34875
34953
  visibleMethod = customOpts.visibleMethod;
34876
34954
  var trVNs = [];
34877
34955
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, function (column, index, items, path, parent) {
@@ -34879,7 +34957,7 @@ function renderPopupPanel(h, _vm) {
34879
34957
  column: column
34880
34958
  }) : true;
34881
34959
  if (isVisible) {
34882
- var isChecked = column.visible;
34960
+ var isChecked = column.renderVisible;
34883
34961
  var isIndeterminate = column.halfVisible;
34884
34962
  var colTitle = panel_formatText(column.getTitle(), 1);
34885
34963
  var isColGroup = column.children && column.children.length;
@@ -34888,35 +34966,18 @@ function renderPopupPanel(h, _vm) {
34888
34966
  }) : false;
34889
34967
  trVNs.push(h('tr', {
34890
34968
  key: column.id,
34891
- class: ["vxe-table-custom-popup--row level--".concat(column.level), {
34892
- 'is--group': isColGroup
34893
- }],
34894
34969
  attrs: {
34895
34970
  colid: column.id
34896
34971
  },
34972
+ class: ["vxe-table-custom-popup--row level--".concat(column.level), {
34973
+ 'is--group': isColGroup
34974
+ }],
34897
34975
  on: {
34898
34976
  dragstart: _vm.sortDragstartEvent,
34899
34977
  dragend: _vm.sortDragendEvent,
34900
34978
  dragover: _vm.sortDragoverEvent
34901
34979
  }
34902
34980
  }, [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
34981
  class: 'vxe-table-custom-popup--column-item col--visible'
34921
34982
  }, [h('div', {
34922
34983
  class: ['vxe-table-custom--checkbox-option', {
@@ -34924,6 +34985,9 @@ function renderPopupPanel(h, _vm) {
34924
34985
  'is--indeterminate': isIndeterminate,
34925
34986
  'is--disabled': isDisabled
34926
34987
  }],
34988
+ attrs: {
34989
+ title: conf.i18n('vxe.custom.setting.colVisible')
34990
+ },
34927
34991
  on: {
34928
34992
  click: function click() {
34929
34993
  if (!isDisabled) {
@@ -34933,11 +34997,31 @@ function renderPopupPanel(h, _vm) {
34933
34997
  }
34934
34998
  }, [h('span', {
34935
34999
  class: ['vxe-checkbox--icon', isIndeterminate ? conf.icon.TABLE_CHECKBOX_INDETERMINATE : isChecked ? conf.icon.TABLE_CHECKBOX_CHECKED : conf.icon.TABLE_CHECKBOX_UNCHECKED]
34936
- })])]), h('td', {
35000
+ })])]), allowSort ? h('td', {
35001
+ class: 'vxe-table-custom-popup--column-item col--sort'
35002
+ }, [column.level === 1 ? h('span', {
35003
+ class: 'vxe-table-custom-popup--column-sort-btn',
35004
+ attrs: {
35005
+ title: conf.i18n('vxe.custom.setting.sortHelpTip')
35006
+ },
35007
+ on: {
35008
+ mousedown: _vm.sortMousedownEvent,
35009
+ mouseup: _vm.sortMouseupEvent
35010
+ }
35011
+ }, [h('i', {
35012
+ class: conf.icon.TABLE_CUSTOM_SORT
35013
+ })]) : null]) : _e(), h('td', {
35014
+ class: 'vxe-table-custom-popup--column-item col--name'
35015
+ }, [h('div', {
35016
+ class: 'vxe-table-custom-popup--name',
35017
+ attrs: {
35018
+ title: colTitle
35019
+ }
35020
+ }, colTitle)]), allowFixed ? h('td', {
34937
35021
  class: 'vxe-table-custom-popup--column-item col--fixed'
34938
- }, [!parent && customOpts.allowFixed ? h('vxe-radio-group', {
35022
+ }, [!parent ? h('vxe-radio-group', {
34939
35023
  props: {
34940
- value: column.fixed || '',
35024
+ value: column.renderFixed || '',
34941
35025
  type: 'button',
34942
35026
  size: 'mini',
34943
35027
  options: [{
@@ -34955,21 +35039,22 @@ function renderPopupPanel(h, _vm) {
34955
35039
  },
34956
35040
  on: {
34957
35041
  input: function input(value) {
34958
- column.fixed = value;
34959
- },
34960
- change: function change() {
34961
- _vm.changePopupFixedOption(column);
34962
- }
35042
+ column.renderFixed = value;
35043
+ } // onChange () {
35044
+ // changePopupFixedOption(column)
35045
+ // }
34963
35046
  }
34964
- }) : null])]));
35047
+ }) : null]) : _e()]));
34965
35048
  }
34966
35049
  });
35050
+ var isAllChecked = customStore.isAll;
35051
+ var isAllIndeterminate = customStore.isIndeterminate;
34967
35052
  return h('vxe-modal', {
34968
35053
  key: 'popup',
34969
35054
  props: {
35055
+ className: 'vxe-table-custom-popup-wrapper vxe-table--ignore-clear',
34970
35056
  value: customStore.visible,
34971
35057
  title: conf.i18n('vxe.custom.cstmTitle'),
34972
- className: 'vxe-table-custom-popup-wrapper vxe-table--ignore-clear',
34973
35058
  width: '40vw',
34974
35059
  minWidth: 520,
34975
35060
  height: '50vh',
@@ -34997,20 +35082,39 @@ function renderPopupPanel(h, _vm) {
34997
35082
  style: {
34998
35083
  width: '80px'
34999
35084
  }
35000
- }), h('col'), h('col', {
35085
+ }), allowSort ? h('col', {
35001
35086
  style: {
35002
35087
  width: '80px'
35003
35088
  }
35004
- }), h('col', {
35089
+ }) : _e(), h('col', {
35090
+ style: {
35091
+ minWidth: '120px'
35092
+ }
35093
+ }), allowFixed ? h('col', {
35005
35094
  style: {
35006
35095
  width: '200px'
35007
35096
  }
35008
- })]), h('thead', {}, [h('tr', {}, [h('th', {}, [h('span', {
35097
+ }) : _e()]), h('thead', {}, [h('tr', {}, [h('th', {}, [h('div', {
35098
+ class: ['vxe-table-custom--checkbox-option', {
35099
+ 'is--checked': isAllChecked,
35100
+ 'is--indeterminate': isAllIndeterminate
35101
+ }],
35102
+ attrs: {
35103
+ title: conf.i18n('vxe.table.allTitle')
35104
+ },
35105
+ on: {
35106
+ click: _vm.allCustomEvent
35107
+ }
35108
+ }, [h('span', {
35109
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? conf.icon.TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? conf.icon.TABLE_CHECKBOX_CHECKED : conf.icon.TABLE_CHECKBOX_UNCHECKED]
35110
+ }), h('span', {
35111
+ class: 'vxe-checkbox--label'
35112
+ }, conf.i18n('vxe.toolbar.customAll'))])]), allowSort ? h('th', {}, [h('span', {
35009
35113
  class: 'vxe-table-custom-popup--table-sort-help-title'
35010
35114
  }, conf.i18n('vxe.custom.setting.colSort')), h('vxe-tooltip', {
35011
35115
  props: {
35012
35116
  enterable: true,
35013
- content: '点击并拖动图标可以调整列的排序'
35117
+ content: conf.i18n('vxe.custom.setting.sortHelpTip')
35014
35118
  },
35015
35119
  scopedSlots: {
35016
35120
  default: function _default() {
@@ -35019,7 +35123,7 @@ function renderPopupPanel(h, _vm) {
35019
35123
  });
35020
35124
  }
35021
35125
  }
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', {
35126
+ })]) : _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
35127
  class: 'vxe-table-custom--body',
35024
35128
  props: {
35025
35129
  tag: 'tbody',
@@ -35038,7 +35142,7 @@ function renderPopupPanel(h, _vm) {
35038
35142
  content: customOpts.resetButtonText || conf.i18n('vxe.custom.cstmRestore')
35039
35143
  },
35040
35144
  on: {
35041
- click: _vm.resetPopupCustomEvent
35145
+ click: _vm.resetCustomEvent
35042
35146
  }
35043
35147
  }), h('vxe-button', {
35044
35148
  props: {
@@ -35059,7 +35163,7 @@ function renderPopupPanel(h, _vm) {
35059
35163
  }
35060
35164
  }
35061
35165
  });
35062
- }
35166
+ };
35063
35167
  /* harmony default export */ var custom_src_panel = ({
35064
35168
  name: 'VxeTableCustomPanel',
35065
35169
  props: {
@@ -35106,23 +35210,66 @@ function renderPopupPanel(h, _vm) {
35106
35210
  }
35107
35211
  }, 300);
35108
35212
  },
35213
+ getStoreData: function getStoreData() {
35214
+ return {};
35215
+ },
35216
+ handleSaveStore: function handleSaveStore(type) {
35217
+ var $xetable = this.$xetable;
35218
+ var id = $xetable.id,
35219
+ customOpts = $xetable.customOpts;
35220
+ var storage = customOpts.storage,
35221
+ updateStore = customOpts.updateStore;
35222
+ if (storage && id && updateStore) {
35223
+ updateStore({
35224
+ id: id,
35225
+ type: type,
35226
+ storeData: this.getStoreData()
35227
+ });
35228
+ }
35229
+ },
35109
35230
  confirmCustomEvent: function confirmCustomEvent(evnt) {
35110
35231
  var $xetable = this.$xetable;
35232
+ var customColumnList = $xetable.customColumnList;
35233
+ customColumnList.forEach(function (column, index) {
35234
+ var sortIndex = index + 1;
35235
+ column.renderSortNumber = sortIndex;
35236
+ column.fixed = column.renderFixed;
35237
+ column.visible = column.renderVisible;
35238
+ });
35111
35239
  $xetable.closeCustom();
35112
35240
  $xetable.emitCustomEvent('confirm', evnt);
35241
+ this.handleSaveStore('confirm');
35113
35242
  },
35114
35243
  cancelCustomEvent: function cancelCustomEvent(evnt) {
35115
35244
  var $xetable = this.$xetable;
35245
+ var customStore = $xetable.customStore,
35246
+ customColumnList = $xetable.customColumnList;
35247
+ var oldSortMaps = customStore.oldSortMaps,
35248
+ oldFixedMaps = customStore.oldFixedMaps,
35249
+ oldVisibleMaps = customStore.oldVisibleMaps;
35250
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, function (column) {
35251
+ var colid = column.getKey();
35252
+ var visible = !!oldVisibleMaps[colid];
35253
+ var fixed = oldFixedMaps[colid] || '';
35254
+ column.renderVisible = visible;
35255
+ column.visible = visible;
35256
+ column.renderFixed = fixed;
35257
+ column.fixed = fixed;
35258
+ column.renderSortNumber = oldSortMaps[colid] || 0;
35259
+ }, {
35260
+ children: 'children'
35261
+ });
35116
35262
  $xetable.closeCustom();
35117
35263
  $xetable.emitCustomEvent('cancel', evnt);
35118
35264
  },
35119
- resetCustomEvent: function resetCustomEvent(evnt) {
35265
+ handleResetCustomEvent: function handleResetCustomEvent(evnt) {
35120
35266
  var $xetable = this.$xetable;
35121
35267
  $xetable.resetColumn(true);
35122
35268
  $xetable.closeCustom();
35123
35269
  $xetable.emitCustomEvent('reset', evnt);
35270
+ this.handleSaveStore('confirm');
35124
35271
  },
35125
- resetPopupCustomEvent: function resetPopupCustomEvent(evnt) {
35272
+ resetCustomEvent: function resetCustomEvent(evnt) {
35126
35273
  var _this = this;
35127
35274
  if (v_x_e_table.modal) {
35128
35275
  v_x_e_table.modal.confirm({
@@ -35131,7 +35278,23 @@ function renderPopupPanel(h, _vm) {
35131
35278
  escClosable: true
35132
35279
  }).then(function (type) {
35133
35280
  if (type === 'confirm') {
35134
- _this.resetCustomEvent(evnt);
35281
+ _this.handleResetCustomEvent(evnt);
35282
+ }
35283
+ });
35284
+ } else {
35285
+ this.handleResetCustomEvent(evnt);
35286
+ }
35287
+ },
35288
+ resetPopupCustomEvent: function resetPopupCustomEvent(evnt) {
35289
+ var _this2 = this;
35290
+ if (v_x_e_table.modal) {
35291
+ v_x_e_table.modal.confirm({
35292
+ content: conf.i18n('vxe.custom.cstmConfirmRestore'),
35293
+ className: 'vxe-table--ignore-clear',
35294
+ escClosable: true
35295
+ }).then(function (type) {
35296
+ if (type === 'confirm') {
35297
+ _this2.resetCustomEvent(evnt);
35135
35298
  }
35136
35299
  });
35137
35300
  } else {
@@ -35160,9 +35323,9 @@ function renderPopupPanel(h, _vm) {
35160
35323
  changeCheckboxOption: function changeCheckboxOption(column) {
35161
35324
  var $xetable = this.$xetable;
35162
35325
  var customOpts = $xetable.customOpts;
35163
- var isChecked = !column.visible;
35326
+ var isChecked = !column.renderVisible;
35164
35327
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], function (item) {
35165
- item.visible = isChecked;
35328
+ item.renderVisible = isChecked;
35166
35329
  item.halfVisible = false;
35167
35330
  });
35168
35331
  this.handleOptionCheck(column);
@@ -35174,21 +35337,23 @@ function renderPopupPanel(h, _vm) {
35174
35337
  changeFixedOption: function changeFixedOption(column, colFixed) {
35175
35338
  var $xetable = this.$xetable;
35176
35339
  var isMaxFixedColumn = $xetable.isMaxFixedColumn;
35177
- if (column.fixed === colFixed) {
35178
- $xetable.clearColumnFixed(column);
35340
+ if (column.renderFixed === colFixed) {
35341
+ column.renderFixed = '';
35342
+ // $xeTable.clearColumnFixed(column)
35179
35343
  } else {
35180
- if (!isMaxFixedColumn || column.fixed) {
35181
- $xetable.setColumnFixed(column, colFixed);
35344
+ if (!isMaxFixedColumn || column.renderFixed) {
35345
+ column.renderFixed = colFixed;
35346
+ // $xeTable.setColumnFixed(column, colFixed)
35182
35347
  }
35183
35348
  }
35184
35349
  },
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
- },
35350
+ // changePopupFixedOption (column) {
35351
+ // const { $xetable } = this
35352
+ // const { isMaxFixedColumn } = $xetable
35353
+ // if (!isMaxFixedColumn) {
35354
+ // $xetable.setColumnFixed(column, column.fixed)
35355
+ // }
35356
+ // },
35192
35357
  allCustomEvent: function allCustomEvent() {
35193
35358
  var $xetable = this.$xetable,
35194
35359
  customStore = this.customStore;
@@ -35200,7 +35365,7 @@ function renderPopupPanel(h, _vm) {
35200
35365
  if (!checkMethod || checkMethod({
35201
35366
  column: column
35202
35367
  })) {
35203
- column.visible = isAll;
35368
+ column.renderVisible = isAll;
35204
35369
  column.halfVisible = false;
35205
35370
  }
35206
35371
  });
@@ -35279,8 +35444,6 @@ function renderPopupPanel(h, _vm) {
35279
35444
  }
35280
35445
  panel_removeClass(trEl, 'active--drag-target');
35281
35446
  panel_removeClass(trEl, 'active--drag-origin');
35282
- // 更新顺序
35283
- this.updateColumnSort();
35284
35447
  },
35285
35448
  sortDragoverEvent: function sortDragoverEvent(evnt) {
35286
35449
  var $xetable = this.$xetable,
@@ -35301,15 +35464,6 @@ function renderPopupPanel(h, _vm) {
35301
35464
  this.prevDropTrEl = trEl;
35302
35465
  }
35303
35466
  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
35467
  }
35314
35468
  }
35315
35469
  });
@@ -37605,7 +37759,7 @@ var Toolbar = VxeToolbar;
37605
37759
  renderEnd: function renderEnd(h) {
37606
37760
  return h('button', {
37607
37761
  class: ['vxe-pager--prev-btn', {
37608
- 'is--disabled': this.currentPage <= 1
37762
+ 'is--disabled': this.currentPage >= this.pageCount
37609
37763
  }],
37610
37764
  attrs: {
37611
37765
  type: 'button',
@@ -42044,7 +42198,8 @@ var Pulldown = VxePulldown;
42044
42198
  customTitle: '列设置',
42045
42199
  customAll: '全部',
42046
42200
  customConfirm: '确认',
42047
- customRestore: '重置',
42201
+ customCancel: '取消',
42202
+ customRestore: '恢复默认',
42048
42203
  maxFixedCol: '最大冻结列的数量不能超过 {0} 个'
42049
42204
  },
42050
42205
  grid: {