vxe-table 3.8.12 → 3.8.13

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 (35) hide show
  1. package/lib/filter/src/mixin.js +19 -14
  2. package/lib/filter/src/mixin.min.js +1 -1
  3. package/lib/filter/src/panel.js +1 -1
  4. package/lib/filter/src/panel.min.js +1 -1
  5. package/lib/icon/style/style.css +1 -1
  6. package/lib/icon/style/style.min.css +1 -1
  7. package/lib/index.css +1 -1
  8. package/lib/index.umd.js +68 -59
  9. package/lib/index.umd.min.js +1 -1
  10. package/lib/modal/src/modal.js +33 -33
  11. package/lib/modal/src/modal.min.js +1 -1
  12. package/lib/style.css +1 -1
  13. package/lib/style.min.css +1 -1
  14. package/lib/table/src/methods.js +13 -9
  15. package/lib/table/src/methods.min.js +1 -1
  16. package/lib/table/style/style.css +2 -1
  17. package/lib/table/style/style.min.css +1 -1
  18. package/lib/tools/log.js +1 -1
  19. package/lib/tools/log.min.js +1 -1
  20. package/lib/v-x-e-table/index.js +1 -1
  21. package/lib/v-x-e-table/index.min.js +1 -1
  22. package/lib/vxe-table/style/style.css +2 -1
  23. package/lib/vxe-table/style/style.min.css +1 -1
  24. package/package.json +1 -1
  25. package/packages/filter/src/mixin.js +17 -14
  26. package/packages/filter/src/panel.js +1 -1
  27. package/packages/modal/src/modal.js +36 -36
  28. package/packages/table/src/methods.js +13 -9
  29. package/styles/table.scss +2 -1
  30. /package/lib/icon/style/{iconfont.1721008774130.ttf → iconfont.1721119959483.ttf} +0 -0
  31. /package/lib/icon/style/{iconfont.1721008774130.woff → iconfont.1721119959483.woff} +0 -0
  32. /package/lib/icon/style/{iconfont.1721008774130.woff2 → iconfont.1721119959483.woff2} +0 -0
  33. /package/lib/{iconfont.1721008774130.ttf → iconfont.1721119959483.ttf} +0 -0
  34. /package/lib/{iconfont.1721008774130.woff → iconfont.1721119959483.woff} +0 -0
  35. /package/lib/{iconfont.1721008774130.woff2 → iconfont.1721119959483.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -11512,7 +11512,7 @@ var es_array_concat = __webpack_require__(8706);
11512
11512
 
11513
11513
 
11514
11514
  function getLog(message, params) {
11515
- return "[vxe-table v".concat("3.8.12", "] ").concat(conf.i18n(message, params));
11515
+ return "[vxe-table v".concat("3.8.13", "] ").concat(conf.i18n(message, params));
11516
11516
  }
11517
11517
  function outLog(type) {
11518
11518
  return function (message, params) {
@@ -13207,7 +13207,7 @@ function component(comp) {
13207
13207
  components[comp.name] = comp;
13208
13208
  }
13209
13209
  }
13210
- var version = "3.8.12";
13210
+ var version = "3.8.13";
13211
13211
  var tableVersion = version;
13212
13212
  var VxeUI = {
13213
13213
  v: v,
@@ -19049,7 +19049,7 @@ var Methods = {
19049
19049
  var el = _this26.$el;
19050
19050
  if (el) {
19051
19051
  autoWidthColumnList.forEach(function (column) {
19052
- var cellElList = el.querySelectorAll(".vxe-body--column.".concat(column.id, ">.vxe-cell"));
19052
+ var cellElList = el.querySelectorAll(".vxe-header--column.".concat(column.id, ">.vxe-cell,.vxe-body--column.").concat(column.id, ">.vxe-cell,.vxe-footer--column.").concat(column.id, ">.vxe-cell"));
19053
19053
  var firstCellEl = cellElList[0];
19054
19054
  var paddingSize = 0;
19055
19055
  if (firstCellEl) {
@@ -19184,19 +19184,23 @@ var Methods = {
19184
19184
  } else {
19185
19185
  this.headerHeight = 0;
19186
19186
  }
19187
+ var overflowX = false;
19188
+ var footerHeight = 0;
19189
+ var scrollbarHeight = 0;
19187
19190
  if (footerElem) {
19188
- var footerHeight = footerElem.offsetHeight;
19189
- this.scrollbarHeight = Math.max(footerHeight - footerElem.clientHeight, 0);
19190
- this.overflowX = tableWidth > footerElem.clientWidth;
19191
- this.footerHeight = footerHeight;
19191
+ footerHeight = footerElem.offsetHeight;
19192
+ overflowX = tableWidth > footerElem.clientWidth;
19193
+ scrollbarHeight = Math.max(footerHeight - footerElem.clientHeight, 0);
19192
19194
  } else {
19193
- this.footerHeight = 0;
19194
- this.scrollbarHeight = Math.max(tableHeight - bodyElem.clientHeight, 0);
19195
- this.overflowX = tableWidth > bodyWidth;
19195
+ overflowX = tableWidth > bodyWidth;
19196
+ scrollbarHeight = Math.max(tableHeight - bodyElem.clientHeight, 0);
19196
19197
  }
19198
+ this.footerHeight = footerHeight;
19199
+ this.overflowX = tableWidth > bodyWidth;
19200
+ this.scrollbarHeight = scrollbarHeight;
19197
19201
  this.updateHeight();
19198
19202
  this.parentHeight = Math.max(this.headerHeight + this.footerHeight + 20, this.getParentHeight());
19199
- if (this.overflowX) {
19203
+ if (overflowX) {
19200
19204
  this.checkScrolling();
19201
19205
  }
19202
19206
  },
@@ -24544,7 +24548,7 @@ var Table = VxeTable;
24544
24548
  var filterRender = column.filterRender;
24545
24549
  var compConf = isEnableConf(filterRender) ? v_x_e_table.renderer.get(filterRender.name) : null;
24546
24550
  var isDisabled = !hasCheckOption && !filterStore.isAllSelected && !filterStore.isIndeterminate;
24547
- return multiple && (compConf ? !(compConf.showTableFilterFooter === false || compConf.showFilterFooter === false) : true) ? [h('div', {
24551
+ return multiple && (compConf ? !(compConf.showTableFilterFooter === false || compConf.showFilterFooter === false || compConf.isFooter === false) : true) ? [h('div', {
24548
24552
  class: 'vxe-table--filter-footer'
24549
24553
  }, [h('button', {
24550
24554
  class: {
@@ -24732,29 +24736,34 @@ var Table = VxeTable;
24732
24736
  this.initStore.filter = true;
24733
24737
  this.$nextTick(function () {
24734
24738
  var $refs = _this.$refs;
24735
- var bodyElem = $refs.tableBody.$el;
24736
- var filterWrapperElem = $refs.filterWrapper.$el;
24737
- var filterWidth = 0;
24738
- var filterHeight = 0;
24739
- var filterHeadElem = null;
24740
- var filterFootElem = null;
24741
- if (filterWrapperElem) {
24742
- filterWidth = filterWrapperElem.offsetWidth;
24743
- filterHeight = filterWrapperElem.offsetHeight;
24744
- filterHeadElem = filterWrapperElem.querySelector('.vxe-table--filter-header');
24745
- filterFootElem = filterWrapperElem.querySelector('.vxe-table--filter-footer');
24739
+ var tableHeader = $refs.tableHeader,
24740
+ tableBody = $refs.tableBody,
24741
+ filterWrapper = $refs.filterWrapper;
24742
+ var bodyElem = tableBody.$el;
24743
+ var headerElem = tableHeader ? tableHeader.$el : null;
24744
+ if (!bodyElem) {
24745
+ return;
24746
+ }
24747
+ var filterWrapperElem = filterWrapper.$el;
24748
+ if (!filterWrapperElem) {
24749
+ return;
24746
24750
  }
24751
+ var filterWidth = filterWrapperElem.offsetWidth;
24752
+ var filterHeight = filterWrapperElem.offsetHeight;
24753
+ var filterHeadElem = filterWrapperElem.querySelector('.vxe-table--filter-header');
24754
+ var filterFootElem = filterWrapperElem.querySelector('.vxe-table--filter-footer');
24747
24755
  var centerWidth = filterWidth / 2;
24748
24756
  var minMargin = 10;
24749
24757
  var maxLeft = bodyElem.clientWidth - filterWidth - minMargin;
24750
24758
  var left, right;
24751
24759
  var style = {
24752
- top: "".concat(targetElem.offsetTop + targetElem.offsetParent.offsetTop + targetElem.offsetHeight + 8, "px")
24760
+ top: "".concat(targetElem.offsetTop + targetElem.offsetParent.offsetTop + targetElem.offsetHeight, "px")
24753
24761
  };
24754
24762
  // 判断面板不能大于表格高度
24755
24763
  var maxHeight = null;
24756
- if (filterHeight >= bodyElem.clientHeight) {
24757
- maxHeight = Math.max(60, bodyElem.clientHeight - (filterFootElem ? filterFootElem.offsetHeight : 0) - (filterHeadElem ? filterHeadElem.offsetHeight : 0));
24764
+ var bodyHeight = bodyElem.clientHeight - (headerElem ? headerElem.clientHeight / 2 : 0);
24765
+ if (filterHeight >= bodyHeight) {
24766
+ maxHeight = Math.max(40, bodyHeight - (filterFootElem ? filterFootElem.offsetHeight : 0) - (filterHeadElem ? filterHeadElem.offsetHeight : 0));
24758
24767
  }
24759
24768
  if (column.fixed === 'left') {
24760
24769
  left = targetElem.offsetLeft + targetElem.offsetParent.offsetLeft - centerWidth;
@@ -26627,12 +26636,12 @@ var msgQueue = [];
26627
26636
  },
26628
26637
  data: function data() {
26629
26638
  return {
26630
- inited: false,
26639
+ initialized: false,
26631
26640
  visible: false,
26632
26641
  contentVisible: false,
26633
26642
  modalTop: 0,
26634
26643
  modalZindex: 0,
26635
- zoomLocat: null,
26644
+ revertLocat: null,
26636
26645
  firstOpen: true
26637
26646
  };
26638
26647
  },
@@ -26698,7 +26707,7 @@ var msgQueue = [];
26698
26707
  $scopedSlots = this.$scopedSlots,
26699
26708
  _this$slots = this.slots,
26700
26709
  slots = _this$slots === void 0 ? {} : _this$slots,
26701
- inited = this.inited,
26710
+ initialized = this.initialized,
26702
26711
  vSize = this.vSize,
26703
26712
  className = this.className,
26704
26713
  type = this.type,
@@ -26711,7 +26720,7 @@ var msgQueue = [];
26711
26720
  status = this.status,
26712
26721
  iconStatus = this.iconStatus,
26713
26722
  showFooter = this.showFooter,
26714
- zoomLocat = this.zoomLocat,
26723
+ revertLocat = this.revertLocat,
26715
26724
  modalTop = this.modalTop,
26716
26725
  dblclickZoom = this.dblclickZoom,
26717
26726
  contentVisible = this.contentVisible,
@@ -26739,7 +26748,7 @@ var msgQueue = [];
26739
26748
  headerOns.dblclick = this.toggleZoomEvent;
26740
26749
  }
26741
26750
  return h('div', {
26742
- class: ['vxe-modal--wrapper', "type--".concat(type), className || '', (_ref = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, "size--".concat(vSize), vSize), "status--".concat(status), status), 'is--animat', animat), 'lock--scroll', lockScroll), 'lock--view', lockView), 'is--resize', resize), 'is--mask', mask), 'is--maximize', zoomLocat), 'is--visible', contentVisible), 'is--active', visible), _defineProperty(_ref, 'is--loading', loading))],
26751
+ class: ['vxe-modal--wrapper', "type--".concat(type), className || '', (_ref = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, "size--".concat(vSize), vSize), "status--".concat(status), status), 'is--animat', animat), 'lock--scroll', lockScroll), 'lock--view', lockView), 'is--resize', resize), 'is--mask', mask), 'is--maximize', revertLocat), 'is--visible', contentVisible), 'is--active', visible), _defineProperty(_ref, 'is--loading', loading))],
26743
26752
  style: {
26744
26753
  zIndex: this.modalZindex,
26745
26754
  top: modalTop ? "".concat(modalTop, "px") : null
@@ -26759,7 +26768,7 @@ var msgQueue = [];
26759
26768
  'is--ellipsis': !isMsg && showTitleOverflow
26760
26769
  }],
26761
26770
  on: headerOns
26762
- }, headerSlot ? !inited || destroyOnClose && !visible ? [] : getSlotVNs(headerSlot.call(this, {
26771
+ }, headerSlot ? !initialized || destroyOnClose && !visible ? [] : getSlotVNs(headerSlot.call(this, {
26763
26772
  $modal: this
26764
26773
  }, h)) : [h('div', {
26765
26774
  class: 'vxe-modal--header-title'
@@ -26772,9 +26781,9 @@ var msgQueue = [];
26772
26781
  }, getSlotVNs(cornerSlot({
26773
26782
  $modal: this
26774
26783
  }))) : _e(), showZoom ? h('i', {
26775
- class: ['vxe-modal--zoom-btn', 'trigger--btn', zoomLocat ? conf.icon.MODAL_ZOOM_OUT : conf.icon.MODAL_ZOOM_IN],
26784
+ class: ['vxe-modal--zoom-btn', 'trigger--btn', revertLocat ? conf.icon.MODAL_ZOOM_OUT : conf.icon.MODAL_ZOOM_IN],
26776
26785
  attrs: {
26777
- title: conf.i18n("vxe.modal.zoom".concat(zoomLocat ? 'Out' : 'In'))
26786
+ title: conf.i18n("vxe.modal.zoom".concat(revertLocat ? 'Out' : 'In'))
26778
26787
  },
26779
26788
  on: {
26780
26789
  click: this.toggleZoomEvent
@@ -26795,7 +26804,7 @@ var msgQueue = [];
26795
26804
  class: ['vxe-modal--status-icon', iconStatus || conf.icon["MODAL_".concat(status).toLocaleUpperCase()]]
26796
26805
  })]) : null, h('div', {
26797
26806
  class: 'vxe-modal--content'
26798
- }, defaultSlot ? !inited || destroyOnClose && !visible ? [] : getSlotVNs(defaultSlot.call(this, {
26807
+ }, defaultSlot ? !initialized || destroyOnClose && !visible ? [] : getSlotVNs(defaultSlot.call(this, {
26799
26808
  $modal: this
26800
26809
  }, h)) : getFuncText(content)),
26801
26810
  /**
@@ -26808,7 +26817,7 @@ var msgQueue = [];
26808
26817
  }
26809
26818
  }) : null]), showFooter ? h('div', {
26810
26819
  class: 'vxe-modal--footer'
26811
- }, footerSlot ? !inited || destroyOnClose && !visible ? [] : getSlotVNs(footerSlot.call(this, {
26820
+ }, footerSlot ? !initialized || destroyOnClose && !visible ? [] : getSlotVNs(footerSlot.call(this, {
26812
26821
  $modal: this
26813
26822
  }, h)) : [external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(showCancelButton) ? showCancelButton : type === 'confirm' ? h('vxe-button', {
26814
26823
  key: 1,
@@ -26916,14 +26925,14 @@ var msgQueue = [];
26916
26925
  var $refs = this.$refs,
26917
26926
  _this$events5 = this.events,
26918
26927
  events = _this$events5 === void 0 ? {} : _this$events5,
26919
- inited = this.inited,
26928
+ initialized = this.initialized,
26920
26929
  duration = this.duration,
26921
26930
  visible = this.visible,
26922
26931
  isMsg = this.isMsg,
26923
26932
  remember = this.remember,
26924
26933
  showFooter = this.showFooter;
26925
- if (!inited) {
26926
- this.inited = true;
26934
+ if (!initialized) {
26935
+ this.initialized = true;
26927
26936
  if (this.transfer) {
26928
26937
  document.body.appendChild(this.$el);
26929
26938
  }
@@ -27074,7 +27083,7 @@ var msgQueue = [];
27074
27083
  }
27075
27084
  _this5.contentVisible = false;
27076
27085
  if (!remember) {
27077
- _this5.zoomLocat = null;
27086
+ _this5.revertLocat = null;
27078
27087
  }
27079
27088
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(allActivedModals, function (item) {
27080
27089
  return item === _this5;
@@ -27116,18 +27125,18 @@ var msgQueue = [];
27116
27125
  return this.$refs.modalBox;
27117
27126
  },
27118
27127
  isMaximized: function isMaximized() {
27119
- return !!this.zoomLocat;
27128
+ return !!this.revertLocat;
27120
27129
  },
27121
27130
  maximize: function maximize() {
27122
27131
  var _this7 = this;
27123
27132
  return this.$nextTick().then(function () {
27124
- if (!_this7.zoomLocat) {
27133
+ if (!_this7.revertLocat) {
27125
27134
  var marginSize = Math.max(0, _this7.marginSize);
27126
27135
  var modalBoxElem = _this7.getBox();
27127
27136
  var _DomTools$getDomNode = dom.getDomNode(),
27128
27137
  visibleHeight = _DomTools$getDomNode.visibleHeight,
27129
27138
  visibleWidth = _DomTools$getDomNode.visibleWidth;
27130
- _this7.zoomLocat = {
27139
+ _this7.revertLocat = {
27131
27140
  top: modalBoxElem.offsetTop,
27132
27141
  left: modalBoxElem.offsetLeft,
27133
27142
  width: modalBoxElem.offsetWidth + (modalBoxElem.style.width ? 0 : 1),
@@ -27146,15 +27155,15 @@ var msgQueue = [];
27146
27155
  revert: function revert() {
27147
27156
  var _this8 = this;
27148
27157
  return this.$nextTick().then(function () {
27149
- var zoomLocat = _this8.zoomLocat;
27150
- if (zoomLocat) {
27158
+ var revertLocat = _this8.revertLocat;
27159
+ if (revertLocat) {
27151
27160
  var modalBoxElem = _this8.getBox();
27152
- _this8.zoomLocat = null;
27161
+ _this8.revertLocat = null;
27153
27162
  Object.assign(modalBoxElem.style, {
27154
- top: "".concat(zoomLocat.top, "px"),
27155
- left: "".concat(zoomLocat.left, "px"),
27156
- width: "".concat(zoomLocat.width, "px"),
27157
- height: "".concat(zoomLocat.height, "px")
27163
+ top: "".concat(revertLocat.top, "px"),
27164
+ left: "".concat(revertLocat.left, "px"),
27165
+ width: "".concat(revertLocat.width, "px"),
27166
+ height: "".concat(revertLocat.height, "px")
27158
27167
  });
27159
27168
  _this8.savePosStorage();
27160
27169
  }
@@ -27162,18 +27171,18 @@ var msgQueue = [];
27162
27171
  },
27163
27172
  zoom: function zoom() {
27164
27173
  var _this9 = this;
27165
- return this[this.zoomLocat ? 'revert' : 'maximize']().then(function () {
27174
+ return this[this.revertLocat ? 'revert' : 'maximize']().then(function () {
27166
27175
  return _this9.isMaximized();
27167
27176
  });
27168
27177
  },
27169
27178
  toggleZoomEvent: function toggleZoomEvent(evnt) {
27170
27179
  var _this10 = this;
27171
27180
  var $listeners = this.$listeners,
27172
- zoomLocat = this.zoomLocat,
27181
+ revertLocat = this.revertLocat,
27173
27182
  _this$events7 = this.events,
27174
27183
  events = _this$events7 === void 0 ? {} : _this$events7;
27175
27184
  var params = {
27176
- type: zoomLocat ? 'revert' : 'max',
27185
+ type: revertLocat ? 'revert' : 'max',
27177
27186
  $modal: this,
27178
27187
  $event: evnt
27179
27188
  };
@@ -27222,9 +27231,9 @@ var msgQueue = [];
27222
27231
  var remember = this.remember,
27223
27232
  storage = this.storage,
27224
27233
  marginSize = this.marginSize,
27225
- zoomLocat = this.zoomLocat;
27234
+ revertLocat = this.revertLocat;
27226
27235
  var modalBoxElem = this.getBox();
27227
- if (!zoomLocat && evnt.button === 0 && !dom.getEventTargetNode(evnt, modalBoxElem, 'trigger--btn').flag) {
27236
+ if (!revertLocat && evnt.button === 0 && !dom.getEventTargetNode(evnt, modalBoxElem, 'trigger--btn').flag) {
27228
27237
  evnt.preventDefault();
27229
27238
  var domMousemove = document.onmousemove;
27230
27239
  var domMouseup = document.onmouseup;
@@ -27432,7 +27441,7 @@ var msgQueue = [];
27432
27441
  }
27433
27442
  };
27434
27443
  document.onmouseup = function () {
27435
- _this12.zoomLocat = null;
27444
+ _this12.revertLocat = null;
27436
27445
  document.onmousemove = domMousemove;
27437
27446
  document.onmouseup = domMouseup;
27438
27447
  setTimeout(function () {
@@ -27486,7 +27495,7 @@ var msgQueue = [];
27486
27495
  modalBoxElem.style.height = "".concat(height, "px");
27487
27496
  }
27488
27497
  if (zoomLeft && zoomTop) {
27489
- this.zoomLocat = {
27498
+ this.revertLocat = {
27490
27499
  left: zoomLeft,
27491
27500
  top: zoomTop,
27492
27501
  width: zoomWidth,
@@ -27501,11 +27510,11 @@ var msgQueue = [];
27501
27510
  remember = this.remember,
27502
27511
  storage = this.storage,
27503
27512
  storageKey = this.storageKey,
27504
- zoomLocat = this.zoomLocat;
27513
+ revertLocat = this.revertLocat;
27505
27514
  if (remember && storage) {
27506
27515
  var modalBoxElem = this.getBox();
27507
27516
  var posStorageMap = this.getStorageMap(storageKey);
27508
- posStorageMap[id] = [modalBoxElem.style.left, modalBoxElem.style.top, modalBoxElem.style.width, modalBoxElem.style.height].concat(zoomLocat ? [zoomLocat.left, zoomLocat.top, zoomLocat.width, zoomLocat.height] : []).map(function (val) {
27517
+ posStorageMap[id] = [modalBoxElem.style.left, modalBoxElem.style.top, modalBoxElem.style.width, modalBoxElem.style.height].concat(revertLocat ? [revertLocat.left, revertLocat.top, revertLocat.width, revertLocat.height] : []).map(function (val) {
27509
27518
  return val ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(val) : '';
27510
27519
  }).join(',');
27511
27520
  localStorage.setItem(storageKey, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toJSONString(posStorageMap));