vxe-table 3.10.5 → 3.10.7

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 (50) hide show
  1. package/es/style.css +1 -1
  2. package/es/style.min.css +1 -1
  3. package/es/table/module/custom/panel.js +28 -6
  4. package/es/table/module/validator/mixin.js +1 -1
  5. package/es/table/src/body.js +14 -8
  6. package/es/table/src/methods.js +29 -11
  7. package/es/table/src/table.js +10 -3
  8. package/es/table/style.css +25 -15
  9. package/es/table/style.min.css +1 -1
  10. package/es/ui/index.js +3 -2
  11. package/es/ui/src/log.js +1 -1
  12. package/es/vxe-table/style.css +25 -15
  13. package/es/vxe-table/style.min.css +1 -1
  14. package/lib/index.umd.js +84 -25
  15. package/lib/index.umd.min.js +1 -1
  16. package/lib/style.css +1 -1
  17. package/lib/style.min.css +1 -1
  18. package/lib/table/module/custom/panel.js +30 -5
  19. package/lib/table/module/custom/panel.min.js +1 -1
  20. package/lib/table/module/validator/mixin.js +1 -1
  21. package/lib/table/module/validator/mixin.min.js +1 -1
  22. package/lib/table/src/body.js +5 -3
  23. package/lib/table/src/body.min.js +1 -1
  24. package/lib/table/src/methods.js +31 -10
  25. package/lib/table/src/methods.min.js +1 -1
  26. package/lib/table/src/table.js +13 -3
  27. package/lib/table/src/table.min.js +1 -1
  28. package/lib/table/style/style.css +25 -15
  29. package/lib/table/style/style.min.css +1 -1
  30. package/lib/ui/index.js +3 -2
  31. package/lib/ui/index.min.js +1 -1
  32. package/lib/ui/src/log.js +1 -1
  33. package/lib/ui/src/log.min.js +1 -1
  34. package/lib/vxe-table/style/style.css +25 -15
  35. package/lib/vxe-table/style/style.min.css +1 -1
  36. package/package.json +2 -2
  37. package/packages/table/module/custom/panel.ts +29 -6
  38. package/packages/table/module/validator/mixin.ts +6 -1
  39. package/packages/table/src/body.ts +14 -8
  40. package/packages/table/src/methods.ts +27 -10
  41. package/packages/table/src/table.ts +10 -3
  42. package/packages/ui/index.ts +2 -1
  43. package/styles/components/table-module/custom.scss +2 -1
  44. package/styles/components/table.scss +36 -26
  45. /package/es/{iconfont.1730971767552.ttf → iconfont.1731028570313.ttf} +0 -0
  46. /package/es/{iconfont.1730971767552.woff → iconfont.1731028570313.woff} +0 -0
  47. /package/es/{iconfont.1730971767552.woff2 → iconfont.1731028570313.woff2} +0 -0
  48. /package/lib/{iconfont.1730971767552.ttf → iconfont.1731028570313.ttf} +0 -0
  49. /package/lib/{iconfont.1730971767552.woff → iconfont.1731028570313.woff} +0 -0
  50. /package/lib/{iconfont.1730971767552.woff2 → iconfont.1731028570313.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
2220
2220
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2221
2221
 
2222
2222
 
2223
- const version = "3.10.5";
2223
+ const version = "3.10.7";
2224
2224
  core_.VxeUI.version = version;
2225
2225
  core_.VxeUI.tableVersion = version;
2226
2226
  core_.VxeUI.setConfig({
@@ -2272,7 +2272,8 @@ core_.VxeUI.setConfig({
2272
2272
  autoClear: true,
2273
2273
  autoPos: true,
2274
2274
  message: 'inline',
2275
- msgMode: 'single'
2275
+ msgMode: 'single',
2276
+ theme: 'normal'
2276
2277
  },
2277
2278
  columnConfig: {
2278
2279
  maxFixedSize: 4
@@ -2768,7 +2769,7 @@ function isNodeElement(elem) {
2768
2769
  const {
2769
2770
  log: log_log
2770
2771
  } = core_.VxeUI;
2771
- const log_version = `table v${"3.10.5"}`;
2772
+ const log_version = `table v${"3.10.7"}`;
2772
2773
  const warnLog = log_log.create('warn', log_version);
2773
2774
  const errLog = log_log.create('error', log_version);
2774
2775
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -5179,7 +5180,22 @@ const hideRowDropTip = $xeTable => {
5179
5180
  };
5180
5181
  const updateRowDropTipContent = ($xeTable, tdEl) => {
5181
5182
  const reactData = $xeTable;
5182
- reactData.dragTipText = tdEl.textContent || '';
5183
+ const {
5184
+ dragRow
5185
+ } = reactData;
5186
+ const dragOpts = $xeTable.computeDragOpts;
5187
+ const {
5188
+ rowTooltipMethod
5189
+ } = dragOpts;
5190
+ let tipContent = '';
5191
+ if (rowTooltipMethod) {
5192
+ tipContent = `${rowTooltipMethod({
5193
+ row: dragRow
5194
+ }) || ''}`;
5195
+ } else {
5196
+ tipContent = methods_getI18n('vxe.table.dragTip', [tdEl.textContent || '']);
5197
+ }
5198
+ reactData.dragTipText = tipContent;
5183
5199
  };
5184
5200
  const Methods = {
5185
5201
  callSlot(slotFunc, params, h, vNodes) {
@@ -10779,10 +10795,14 @@ const Methods = {
10779
10795
  const {
10780
10796
  rowExpandedMaps
10781
10797
  } = this;
10782
- rowRest.expandLoaded = true;
10798
+ if (rowRest) {
10799
+ rowRest.expandLoaded = true;
10800
+ }
10783
10801
  rowExpandedMaps[rowid] = row;
10784
10802
  }).catch(() => {
10785
- rowRest.expandLoaded = false;
10803
+ if (rowRest) {
10804
+ rowRest.expandLoaded = false;
10805
+ }
10786
10806
  }).finally(() => {
10787
10807
  const {
10788
10808
  rowExpandLazyLoadedMaps
@@ -11256,13 +11276,15 @@ const Methods = {
11256
11276
  const rowid = getRowid(this, row);
11257
11277
  if (!treeTempExpandedMaps[rowid]) {
11258
11278
  const rowRest = fullAllDataRowIdData[rowid];
11259
- const isLoad = lazy && row[hasChildField] && !rowRest.treeLoaded && !treeExpandLazyLoadedMaps[rowid];
11260
- // 是否使用懒加载
11261
- if (isLoad) {
11262
- result.push(this.handleAsyncTreeExpandChilds(row));
11263
- } else {
11264
- if (row[childrenField] && row[childrenField].length) {
11265
- treeTempExpandedMaps[rowid] = row;
11279
+ if (rowRest) {
11280
+ const isLoad = lazy && row[hasChildField] && !rowRest.treeLoaded && !treeExpandLazyLoadedMaps[rowid];
11281
+ // 是否使用懒加载
11282
+ if (isLoad) {
11283
+ result.push(this.handleAsyncTreeExpandChilds(row));
11284
+ } else {
11285
+ if (row[childrenField] && row[childrenField].length) {
11286
+ treeTempExpandedMaps[rowid] = row;
11287
+ }
11266
11288
  }
11267
11289
  }
11268
11290
  }
@@ -12512,13 +12534,15 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
12512
12534
  ...errorValidItem
12513
12535
  };
12514
12536
  tdVNs.push(h('div', {
12515
- class: ['vxe-cell--valid-error-hint', getClass(validOpts.className, errorValidItem)],
12537
+ class: ['vxe-cell--valid-error-tip', getClass(validOpts.className, errorValidItem)],
12516
12538
  style: errRule && errRule.maxWidth ? {
12517
12539
  width: `${errRule.maxWidth}px`
12518
12540
  } : null
12519
- }, validSlot ? $xetable.callSlot(validSlot, validParams, h) : [h('span', {
12541
+ }, [h('div', {
12542
+ class: `vxe-cell--valid-error-wrapper vxe-cell--valid-error-theme-${validOpts.theme || 'normal'}`
12543
+ }, [validSlot ? $xetable.callSlot(validSlot, validParams, h) : [h('span', {
12520
12544
  class: 'vxe-cell--valid-error-msg'
12521
- }, errorValidItem.content)]));
12545
+ }, errorValidItem.content)]])]));
12522
12546
  }
12523
12547
  }
12524
12548
  let cellHeight = '';
@@ -14383,7 +14407,7 @@ const renderSimplePanel = (h, _vm) => {
14383
14407
  const renderPopupPanel = (h, _vm) => {
14384
14408
  const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
14385
14409
  const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
14386
- const VxeUIInputComponent = core_.VxeUI.getComponent('VxeInput');
14410
+ const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeInput');
14387
14411
  const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
14388
14412
  const $xeTableCustomPanel = _vm;
14389
14413
  const $xeTable = _vm.$xeTable;
@@ -14409,6 +14433,11 @@ const renderPopupPanel = (h, _vm) => {
14409
14433
  const {
14410
14434
  maxFixedSize
14411
14435
  } = columnOpts;
14436
+ const resizableOpts = $xeTable.computeResizableOpts;
14437
+ const {
14438
+ minWidth: reMinWidth,
14439
+ maxWidth: reMaxWidth
14440
+ } = resizableOpts;
14412
14441
  const modalOpts = Object.assign({}, modalOptions);
14413
14442
  const slots = customOpts.slots || {};
14414
14443
  const headerSlot = slots.header;
@@ -14431,6 +14460,24 @@ const renderPopupPanel = (h, _vm) => {
14431
14460
  column
14432
14461
  }) : true;
14433
14462
  if (isVisible) {
14463
+ // 默认继承调整宽度
14464
+ let customMinWidth = 0;
14465
+ let customMaxWidth = 0;
14466
+ if (allowResizable) {
14467
+ const resizeParams = {
14468
+ $table: $xeTable,
14469
+ column,
14470
+ columnIndex: index,
14471
+ $columnIndex: index,
14472
+ $rowIndex: -1
14473
+ };
14474
+ if (reMinWidth) {
14475
+ customMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(reMinWidth) ? reMinWidth(resizeParams) : reMinWidth);
14476
+ }
14477
+ if (reMaxWidth) {
14478
+ customMaxWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(reMaxWidth) ? reMaxWidth(resizeParams) : reMaxWidth);
14479
+ }
14480
+ }
14434
14481
  const isChecked = column.renderVisible;
14435
14482
  const isIndeterminate = column.halfVisible;
14436
14483
  const colTitle = formatText(column.getTitle(), 1);
@@ -14503,11 +14550,13 @@ const renderPopupPanel = (h, _vm) => {
14503
14550
  }
14504
14551
  }, colTitle)]), allowResizable ? h('td', {
14505
14552
  class: 'vxe-table-custom-popup--column-item col--resizable'
14506
- }, [column.children && column.children.length ? h('span', '-') : VxeUIInputComponent ? h(VxeUIInputComponent, {
14553
+ }, [column.children && column.children.length ? h('span', '-') : VxeUINumberInputComponent ? h(VxeUINumberInputComponent, {
14507
14554
  props: {
14508
14555
  type: 'integer',
14509
14556
  disabled: isDisabled || isHidden,
14510
- value: column.renderResizeWidth
14557
+ value: column.renderResizeWidth,
14558
+ min: customMinWidth || undefined,
14559
+ max: customMaxWidth || undefined
14511
14560
  },
14512
14561
  on: {
14513
14562
  modelValue(value) {
@@ -14698,7 +14747,7 @@ const renderPopupPanel = (h, _vm) => {
14698
14747
  const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
14699
14748
  const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
14700
14749
  const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
14701
- const VxeUIInputComponent = core_.VxeUI.getComponent('VxeInput');
14750
+ const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeNumberInput');
14702
14751
  const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
14703
14752
  const VxeUIRadioGroupComponent = core_.VxeUI.getComponent('VxeRadioGroup');
14704
14753
  this.$nextTick(() => {
@@ -14720,7 +14769,7 @@ const renderPopupPanel = (h, _vm) => {
14720
14769
  if (!VxeUIButtonComponent) {
14721
14770
  errLog('vxe.error.reqComp', ['vxe-button']);
14722
14771
  }
14723
- if (!VxeUIInputComponent) {
14772
+ if (!VxeUINumberInputComponent) {
14724
14773
  errLog('vxe.error.reqComp', ['vxe-input']);
14725
14774
  }
14726
14775
  if (!VxeUITooltipComponent) {
@@ -20162,7 +20211,7 @@ function validErrorRuleValue(rule, val) {
20162
20211
  } = this;
20163
20212
  if (validOpts.msgMode === 'single') {
20164
20213
  const keys = Object.keys(validErrMaps);
20165
- const resMaps = validErrMaps;
20214
+ const resMaps = {};
20166
20215
  if (keys.length) {
20167
20216
  const firstKey = keys[0];
20168
20217
  resMaps[firstKey] = validErrMaps[firstKey];
@@ -21977,6 +22026,7 @@ function handleUupdateResize(_vm) {
21977
22026
  const VxeUILoadingComponent = core_.VxeUI.getComponent('VxeLoading');
21978
22027
  const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
21979
22028
  const $xeTable = this;
22029
+ const reactData = $xeTable;
21980
22030
  const {
21981
22031
  _e,
21982
22032
  $scopedSlots,
@@ -22021,13 +22071,20 @@ function handleUupdateResize(_vm) {
22021
22071
  loadingOpts,
22022
22072
  editRules
22023
22073
  } = $xeTable;
22074
+ const {
22075
+ dragRow,
22076
+ dragTipText
22077
+ } = reactData;
22024
22078
  const {
22025
22079
  leftList,
22026
22080
  rightList
22027
22081
  } = columnStore;
22028
22082
  const currLoading = this._isLoading || loading;
22029
22083
  const vSize = computeSize;
22084
+ const dragOpts = $xeTable.computeDragOpts;
22030
22085
  const virtualScrollBars = $xeTable.computeVirtualScrollBars;
22086
+ const dragSlots = dragOpts.slots || {};
22087
+ const rowTipSlot = dragSlots.rowTip;
22031
22088
  return h('div', {
22032
22089
  class: ['vxe-table', 'vxe-table--render-default', `tid_${tId}`, vSize ? `size--${vSize}` : '', `border--${tableBorder}`, {
22033
22090
  [`valid-msg--${validOpts.msgMode}`]: !!editRules,
@@ -22232,10 +22289,12 @@ function handleUupdateResize(_vm) {
22232
22289
  /**
22233
22290
  * 拖拽提示
22234
22291
  */
22235
- rowOpts.drag ? h('div', {
22292
+ rowOpts.drag && (dragRow || dragTipText) ? h('div', {
22236
22293
  ref: 'refRowDragTipElem',
22237
- class: 'vxe-table--row-drag-hint'
22238
- }, table_getI18n('vxe.table.dragTip', [this.dragTipText])) : _e(), h('div', {}, [
22294
+ class: 'vxe-table--row-drag-tip'
22295
+ }, rowTipSlot ? dragRow ? this.callSlot(rowTipSlot, {
22296
+ row: dragRow
22297
+ }, h) : [table_renderEmptyElement($xeTable)] : dragTipText ? [h('span', dragTipText)] : [table_renderEmptyElement($xeTable)]) : _e(), h('div', {}, [
22239
22298
  /**
22240
22299
  * 提示相关
22241
22300
  */