vxe-table 3.8.23 → 3.8.24

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 (60) hide show
  1. package/lib/custom/src/mixin.js +1 -1
  2. package/lib/custom/src/mixin.min.js +1 -1
  3. package/lib/custom/src/panel.js +18 -7
  4. package/lib/custom/src/panel.min.js +1 -1
  5. package/lib/edit/src/mixin.js +8 -2
  6. package/lib/edit/src/mixin.min.js +1 -1
  7. package/lib/icon/style/style.css +1 -1
  8. package/lib/icon/style/style.min.css +1 -1
  9. package/lib/index.css +1 -1
  10. package/lib/index.umd.js +80 -38
  11. package/lib/index.umd.min.js +1 -1
  12. package/lib/keyboard/src/mixin.js +1 -1
  13. package/lib/keyboard/src/mixin.min.js +1 -1
  14. package/lib/style.css +1 -1
  15. package/lib/style.min.css +1 -1
  16. package/lib/table/src/body.js +1 -0
  17. package/lib/table/src/body.min.js +1 -1
  18. package/lib/table/src/cell.js +9 -7
  19. package/lib/table/src/cell.min.js +1 -1
  20. package/lib/table/src/methods.js +8 -8
  21. package/lib/table/src/methods.min.js +1 -1
  22. package/lib/table/style/style.css +1 -0
  23. package/lib/table/style/style.min.css +1 -1
  24. package/lib/textarea/src/textarea.js +2 -2
  25. package/lib/textarea/src/textarea.min.js +1 -1
  26. package/lib/textarea/style/style.css +4 -3
  27. package/lib/textarea/style/style.min.css +1 -1
  28. package/lib/tools/log.js +1 -1
  29. package/lib/tools/log.min.js +1 -1
  30. package/lib/tooltip/src/tooltip.js +23 -7
  31. package/lib/tooltip/src/tooltip.min.js +1 -1
  32. package/lib/v-x-e-table/index.js +7 -1
  33. package/lib/v-x-e-table/index.min.js +1 -1
  34. package/lib/validator/src/mixin.js +1 -1
  35. package/lib/validator/src/mixin.min.js +1 -1
  36. package/lib/vxe-table/style/style.css +1 -0
  37. package/lib/vxe-table/style/style.min.css +1 -1
  38. package/lib/vxe-textarea/style/style.css +4 -3
  39. package/lib/vxe-textarea/style/style.min.css +1 -1
  40. package/package.json +1 -1
  41. package/packages/custom/src/mixin.js +1 -1
  42. package/packages/custom/src/panel.js +18 -7
  43. package/packages/edit/src/mixin.js +8 -2
  44. package/packages/keyboard/src/mixin.js +1 -1
  45. package/packages/table/src/body.js +1 -1
  46. package/packages/table/src/cell.js +6 -5
  47. package/packages/table/src/methods.js +8 -8
  48. package/packages/textarea/src/textarea.js +3 -3
  49. package/packages/tooltip/src/tooltip.js +23 -7
  50. package/packages/v-x-e-table/index.js +5 -0
  51. package/packages/validator/src/mixin.js +1 -1
  52. package/styles/table.scss +1 -0
  53. package/styles/textarea.scss +3 -2
  54. package/types/column.d.ts +57 -1
  55. /package/lib/icon/style/{iconfont.1724894779531.ttf → iconfont.1725243866550.ttf} +0 -0
  56. /package/lib/icon/style/{iconfont.1724894779531.woff → iconfont.1725243866550.woff} +0 -0
  57. /package/lib/icon/style/{iconfont.1724894779531.woff2 → iconfont.1725243866550.woff2} +0 -0
  58. /package/lib/{iconfont.1724894779531.ttf → iconfont.1725243866550.ttf} +0 -0
  59. /package/lib/{iconfont.1724894779531.woff → iconfont.1725243866550.woff} +0 -0
  60. /package/lib/{iconfont.1724894779531.woff2 → iconfont.1725243866550.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -10735,6 +10735,7 @@ __webpack_require__.d(__webpack_exports__, {
10735
10735
  "default": function() { return /* binding */ entry_lib; },
10736
10736
  formats: function() { return /* reexport */ formats; },
10737
10737
  getComponent: function() { return /* reexport */ getComponent; },
10738
+ getConfig: function() { return /* reexport */ getConfig; },
10738
10739
  getTheme: function() { return /* reexport */ getTheme; },
10739
10740
  globalConfs: function() { return /* reexport */ globalConfs; },
10740
10741
  globalStore: function() { return /* reexport */ globalStore; },
@@ -10837,6 +10838,7 @@ __webpack_require__.d(all_namespaceObject, {
10837
10838
  config: function() { return config; },
10838
10839
  formats: function() { return formats; },
10839
10840
  getComponent: function() { return getComponent; },
10841
+ getConfig: function() { return getConfig; },
10840
10842
  getTheme: function() { return getTheme; },
10841
10843
  globalConfs: function() { return globalConfs; },
10842
10844
  globalStore: function() { return globalStore; },
@@ -11522,7 +11524,7 @@ var es_array_concat = __webpack_require__(8706);
11522
11524
 
11523
11525
 
11524
11526
  function getLog(message, params) {
11525
- return "[vxe-table v".concat("3.8.23", "] ").concat(conf.i18n(message, params));
11527
+ return "[vxe-table v".concat("3.8.24", "] ").concat(conf.i18n(message, params));
11526
11528
  }
11527
11529
  function outLog(type) {
11528
11530
  return function (message, params) {
@@ -13142,6 +13144,9 @@ var setConfig = function setConfig(options) {
13142
13144
  }
13143
13145
  return VxeUI;
13144
13146
  };
13147
+ function getConfig(key, defaultValue) {
13148
+ return arguments.length ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(conf, key, defaultValue) : conf;
13149
+ }
13145
13150
  var VXETableConfig = /*#__PURE__*/function () {
13146
13151
  function VXETableConfig() {
13147
13152
  _classCallCheck(this, VXETableConfig);
@@ -13226,7 +13231,7 @@ function component(comp) {
13226
13231
  components[comp.name] = comp;
13227
13232
  }
13228
13233
  }
13229
- var version = "3.8.23";
13234
+ var version = "3.8.24";
13230
13235
  var tableVersion = version;
13231
13236
  var VxeUI = {
13232
13237
  v: v,
@@ -13235,6 +13240,7 @@ var VxeUI = {
13235
13240
  reg: reg,
13236
13241
  use: use,
13237
13242
  setConfig: setConfig,
13243
+ getConfig: getConfig,
13238
13244
  setIcon: setIcon,
13239
13245
  globalStore: globalStore,
13240
13246
  interceptor: interceptor,
@@ -14147,6 +14153,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
14147
14153
  var params = {
14148
14154
  $table: $xetable,
14149
14155
  $grid: $xetable.$xegrid,
14156
+ isEdit: false,
14150
14157
  seq: seq,
14151
14158
  rowid: rowid,
14152
14159
  row: row,
@@ -16659,26 +16666,28 @@ var Cell = {
16659
16666
  formatter = column.formatter;
16660
16667
  var compConf = v_x_e_table.renderer.get(editRender.name);
16661
16668
  var rtEdit = compConf ? compConf.renderTableEdit || compConf.renderEdit : null;
16669
+ var cellParams = Object.assign({
16670
+ $type: '',
16671
+ isEdit: isEdit
16672
+ }, params);
16662
16673
  if (isEdit) {
16663
16674
  if (slots && slots.edit) {
16664
- return $table.callSlot(slots.edit, params, h);
16675
+ return $table.callSlot(slots.edit, cellParams, h);
16665
16676
  }
16666
16677
  if (rtEdit) {
16667
- return getSlotVNs(rtEdit.call($table, h, editRender, Object.assign({
16668
- $type: 'edit'
16669
- }, params)));
16678
+ return getSlotVNs(rtEdit.call($table, h, editRender, cellParams));
16670
16679
  }
16671
16680
  return [];
16672
16681
  }
16673
16682
  if (slots && slots.default) {
16674
- return $table.callSlot(slots.default, params, h);
16683
+ return $table.callSlot(slots.default, cellParams, h);
16675
16684
  }
16676
16685
  if (formatter) {
16677
16686
  return [h('span', {
16678
16687
  class: 'vxe-cell--label'
16679
- }, [getDefaultCellLabel(params)])];
16688
+ }, [getDefaultCellLabel(cellParams)])];
16680
16689
  }
16681
- return Cell.renderDefaultCell.call(_vm, h, params);
16690
+ return Cell.renderDefaultCell.call(_vm, h, cellParams);
16682
16691
  }
16683
16692
  };
16684
16693
  /* harmony default export */ var cell = (Cell);
@@ -18835,9 +18844,9 @@ var Methods = {
18835
18844
  /**
18836
18845
  * 刷新列配置
18837
18846
  */
18838
- refreshColumn: function refreshColumn(resiveOrder) {
18847
+ refreshColumn: function refreshColumn(initOrder) {
18839
18848
  var _this22 = this;
18840
- if (resiveOrder) {
18849
+ if (initOrder) {
18841
18850
  var columnList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(this.collectColumn, 'renderSortNumber');
18842
18851
  this.collectColumn = columnList;
18843
18852
  var tableFullColumn = methods_getColumnList(columnList);
@@ -19841,7 +19850,7 @@ var Methods = {
19841
19850
  if (selected.row && selected.column) {
19842
19851
  evnt.stopPropagation();
19843
19852
  evnt.preventDefault();
19844
- _this31.handleActived(selected.args, evnt);
19853
+ _this31.handleEdit(selected.args, evnt);
19845
19854
  }
19846
19855
  }
19847
19856
  } else if (isContextMenu) {
@@ -19960,7 +19969,7 @@ var Methods = {
19960
19969
  backMethod(_params3);
19961
19970
  } else {
19962
19971
  setCellValue(selected.row, selected.column, null);
19963
- _this31.handleActived(selected.args, evnt);
19972
+ _this31.handleEdit(selected.args, evnt);
19964
19973
  }
19965
19974
  _this31.emitEvent('cell-backspace-value', _params3, evnt);
19966
19975
  }
@@ -20011,7 +20020,7 @@ var Methods = {
20011
20020
  editMethod(_params5);
20012
20021
  } else {
20013
20022
  setCellValue(selected.row, selected.column, null);
20014
- _this31.handleActived(selected.args, evnt);
20023
+ _this31.handleEdit(selected.args, evnt);
20015
20024
  }
20016
20025
  var afterEditMethod = editOpts.afterEditMethod;
20017
20026
  if (afterEditMethod) {
@@ -21353,7 +21362,7 @@ var Methods = {
21353
21362
  this.checkValidate('blur').catch(function (e) {
21354
21363
  return e;
21355
21364
  }).then(function () {
21356
- _this39.handleActived(params, evnt).then(function () {
21365
+ _this39.handleEdit(params, evnt).then(function () {
21357
21366
  return _this39.checkValidate('change');
21358
21367
  }).catch(function (e) {
21359
21368
  return e;
@@ -21468,14 +21477,14 @@ var Methods = {
21468
21477
  this.checkValidate('blur').catch(function (e) {
21469
21478
  return e;
21470
21479
  }).then(function () {
21471
- _this40.handleActived(params, evnt).then(function () {
21480
+ _this40.handleEdit(params, evnt).then(function () {
21472
21481
  return _this40.checkValidate('change');
21473
21482
  }).catch(function (e) {
21474
21483
  return e;
21475
21484
  });
21476
21485
  });
21477
21486
  } else if (editOpts.mode === 'cell') {
21478
- this.handleActived(params, evnt).then(function () {
21487
+ this.handleEdit(params, evnt).then(function () {
21479
21488
  return _this40.checkValidate('change');
21480
21489
  }).catch(function (e) {
21481
21490
  return e;
@@ -26027,7 +26036,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
26027
26036
  /**
26028
26037
  * 处理激活编辑
26029
26038
  */
26030
- handleActived: function handleActived(params, evnt) {
26039
+ handleEdit: function handleEdit(params, evnt) {
26031
26040
  var _this7 = this;
26032
26041
  var editStore = this.editStore,
26033
26042
  editOpts = this.editOpts,
@@ -26132,6 +26141,12 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
26132
26141
  }
26133
26142
  return this.$nextTick();
26134
26143
  },
26144
+ /**
26145
+ * @deprecated
26146
+ */
26147
+ handleActived: function handleActived(params, evnt) {
26148
+ return this.handleEdit(params, evnt);
26149
+ },
26135
26150
  _getColumnModel: function _getColumnModel(row, column) {
26136
26151
  var model = column.model,
26137
26152
  editRender = column.editRender;
@@ -26312,7 +26327,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
26312
26327
  return this.scrollToRow(row, true).then(function () {
26313
26328
  var cell = _this9.getCellElement(row, column);
26314
26329
  if (cell) {
26315
- _this9.handleActived({
26330
+ _this9.handleEdit({
26316
26331
  row: row,
26317
26332
  rowIndex: _this9.getRowIndex(row),
26318
26333
  column: column,
@@ -34084,7 +34099,7 @@ function getCheckboxRangeRows(_vm, params, targetTrElem, moveRange) {
34084
34099
  if (editConfig) {
34085
34100
  if (editOpts.trigger === 'click' || editOpts.trigger === 'dblclick') {
34086
34101
  if (editOpts.mode === 'row') {
34087
- this.handleActived(params, evnt);
34102
+ this.handleEdit(params, evnt);
34088
34103
  } else {
34089
34104
  this.scrollToRow(params.row, params.column).then(function () {
34090
34105
  return _this.handleSelected(params, evnt);
@@ -34513,7 +34528,7 @@ function validErrorRuleValue(rule, val) {
34513
34528
  _this.emitEvent('valid-error', params);
34514
34529
  resolve();
34515
34530
  } else {
34516
- _this.handleActived(params, {
34531
+ _this.handleEdit(params, {
34517
34532
  type: 'valid-error',
34518
34533
  trigger: 'call'
34519
34534
  }).then(function () {
@@ -35006,7 +35021,7 @@ var Validator = VxeTableValidatorModule;
35006
35021
  // 判断面板不能大于表格高度
35007
35022
  var tableHeight = 0;
35008
35023
  if ($el) {
35009
- tableHeight = $el.clientHeight - 30;
35024
+ tableHeight = $el.clientHeight - 28;
35010
35025
  }
35011
35026
  customStore.maxHeight = Math.max(4, tableHeight);
35012
35027
  },
@@ -36128,7 +36143,10 @@ var renderPopupPanel = function renderPopupPanel(h, _vm) {
36128
36143
  allowFixed = customOpts.allowFixed,
36129
36144
  allowResizable = customOpts.allowResizable;
36130
36145
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, function (column, index, items, path, parent) {
36131
- if (!parent) {
36146
+ if (parent) {
36147
+ // 更新子列信息
36148
+ column.fixed = parent.fixed;
36149
+ } else {
36132
36150
  if (allowSort) {
36133
36151
  var sortIndex = index + 1;
36134
36152
  column.renderSortNumber = sortIndex;
@@ -36279,22 +36297,30 @@ var renderPopupPanel = function renderPopupPanel(h, _vm) {
36279
36297
  customOpts = $xetable.customOpts;
36280
36298
  if (customOpts.immediate) {
36281
36299
  if (column.renderFixed === colFixed) {
36282
- column.fixed = '';
36283
- column.renderFixed = '';
36300
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], function (col) {
36301
+ col.fixed = '';
36302
+ col.renderFixed = '';
36303
+ });
36284
36304
  } else {
36285
36305
  if (!isMaxFixedColumn || column.renderFixed) {
36286
- column.fixed = colFixed;
36287
- column.renderFixed = colFixed;
36306
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], function (col) {
36307
+ col.fixed = colFixed;
36308
+ col.renderFixed = colFixed;
36309
+ });
36288
36310
  }
36289
36311
  }
36290
36312
  $xetable.handleCustom();
36291
36313
  $xetable.saveCustomStore('update:fixed');
36292
36314
  } else {
36293
36315
  if (column.renderFixed === colFixed) {
36294
- column.renderFixed = '';
36316
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], function (col) {
36317
+ col.renderFixed = '';
36318
+ });
36295
36319
  } else {
36296
36320
  if (!isMaxFixedColumn || column.renderFixed) {
36297
- column.renderFixed = colFixed;
36321
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], function (col) {
36322
+ col.renderFixed = colFixed;
36323
+ });
36298
36324
  }
36299
36325
  }
36300
36326
  }
@@ -39562,7 +39588,7 @@ var autoTxtElem;
39562
39588
  maxlength: [String, Number],
39563
39589
  rows: {
39564
39590
  type: [String, Number],
39565
- default: 2
39591
+ default: null
39566
39592
  },
39567
39593
  cols: {
39568
39594
  type: [String, Number],
@@ -39670,7 +39696,7 @@ var autoTxtElem;
39670
39696
  attrs.placeholder = getFuncText(placeholder);
39671
39697
  }
39672
39698
  return h('div', {
39673
- class: ['vxe-textarea', className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--autosize', autosize), 'is--disabled', disabled), 'def--rows', !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(rows)), 'def--cols', !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(cols))],
39699
+ class: ['vxe-textarea', className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--autosize', autosize), 'is--disabled', disabled), 'is--rows', !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(rows)), 'is--cols', !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(cols))],
39674
39700
  attrs: {
39675
39701
  spellcheck: false
39676
39702
  }
@@ -40100,11 +40126,12 @@ function renderContent(h, _vm) {
40100
40126
  var $scopedSlots = _vm.$scopedSlots,
40101
40127
  useHTML = _vm.useHTML,
40102
40128
  tipContent = _vm.tipContent;
40103
- if ($scopedSlots.content) {
40129
+ var contentSlot = $scopedSlots.content;
40130
+ if (contentSlot) {
40104
40131
  return h('div', {
40105
40132
  key: 1,
40106
40133
  class: 'vxe-table--tooltip-content'
40107
- }, $scopedSlots.content.call(this, {}));
40134
+ }, contentSlot.call(this, {}));
40108
40135
  }
40109
40136
  if (useHTML) {
40110
40137
  return h('div', {
@@ -40189,7 +40216,11 @@ function renderContent(h, _vm) {
40189
40216
  },
40190
40217
  value: function value(_value) {
40191
40218
  if (!this.isUpdate) {
40192
- this[_value ? 'open' : 'close']();
40219
+ if (_value) {
40220
+ this.handleVisible(this.target, this.content);
40221
+ } else {
40222
+ this.close();
40223
+ }
40193
40224
  }
40194
40225
  this.isUpdate = false;
40195
40226
  }
@@ -40234,7 +40265,7 @@ function renderContent(h, _vm) {
40234
40265
  }
40235
40266
  }
40236
40267
  if (value) {
40237
- this.open();
40268
+ this.handleVisible(target, content);
40238
40269
  }
40239
40270
  }
40240
40271
  },
@@ -40286,7 +40317,7 @@ function renderContent(h, _vm) {
40286
40317
  },
40287
40318
  methods: {
40288
40319
  open: function open(target, content) {
40289
- return this.toVisible(target || this.target, content);
40320
+ return this.handleVisible(target || this.target, content);
40290
40321
  },
40291
40322
  close: function close() {
40292
40323
  this.tipTarget = null;
@@ -40314,6 +40345,13 @@ function renderContent(h, _vm) {
40314
40345
  }
40315
40346
  },
40316
40347
  toVisible: function toVisible(target, content) {
40348
+ return this.handleVisible(target, content);
40349
+ },
40350
+ handleVisible: function handleVisible(target, content) {
40351
+ var contentSlot = this.$scopedSlots.default;
40352
+ if (!contentSlot && (content === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(content))) {
40353
+ return this.$nextTick();
40354
+ }
40317
40355
  if (target) {
40318
40356
  var trigger = this.trigger,
40319
40357
  enterDelay = this.enterDelay;
@@ -40350,10 +40388,14 @@ function renderContent(h, _vm) {
40350
40388
  this.tipActive = !!actived;
40351
40389
  },
40352
40390
  clickEvent: function clickEvent() {
40353
- this[this.visible ? 'close' : 'open']();
40391
+ if (this.visible) {
40392
+ this.close();
40393
+ } else {
40394
+ this.handleVisible(this.target, this.content);
40395
+ }
40354
40396
  },
40355
40397
  targetMouseenterEvent: function targetMouseenterEvent() {
40356
- this.open();
40398
+ this.handleVisible(this.target, this.content);
40357
40399
  },
40358
40400
  targetMouseleaveEvent: function targetMouseleaveEvent() {
40359
40401
  var _this3 = this;