vxe-table 3.10.6 → 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 +13 -1
  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 +69 -16
  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 +16 -1
  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 +12 -1
  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.1730978752470.ttf → iconfont.1731028570313.ttf} +0 -0
  46. /package/es/{iconfont.1730978752470.woff → iconfont.1731028570313.woff} +0 -0
  47. /package/es/{iconfont.1730978752470.woff2 → iconfont.1731028570313.woff2} +0 -0
  48. /package/lib/{iconfont.1730978752470.ttf → iconfont.1731028570313.ttf} +0 -0
  49. /package/lib/{iconfont.1730978752470.woff → iconfont.1731028570313.woff} +0 -0
  50. /package/lib/{iconfont.1730978752470.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.6";
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.6"}`;
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) {
@@ -12518,13 +12534,15 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
12518
12534
  ...errorValidItem
12519
12535
  };
12520
12536
  tdVNs.push(h('div', {
12521
- class: ['vxe-cell--valid-error-hint', getClass(validOpts.className, errorValidItem)],
12537
+ class: ['vxe-cell--valid-error-tip', getClass(validOpts.className, errorValidItem)],
12522
12538
  style: errRule && errRule.maxWidth ? {
12523
12539
  width: `${errRule.maxWidth}px`
12524
12540
  } : null
12525
- }, 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', {
12526
12544
  class: 'vxe-cell--valid-error-msg'
12527
- }, errorValidItem.content)]));
12545
+ }, errorValidItem.content)]])]));
12528
12546
  }
12529
12547
  }
12530
12548
  let cellHeight = '';
@@ -14389,7 +14407,7 @@ const renderSimplePanel = (h, _vm) => {
14389
14407
  const renderPopupPanel = (h, _vm) => {
14390
14408
  const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
14391
14409
  const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
14392
- const VxeUIInputComponent = core_.VxeUI.getComponent('VxeInput');
14410
+ const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeInput');
14393
14411
  const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
14394
14412
  const $xeTableCustomPanel = _vm;
14395
14413
  const $xeTable = _vm.$xeTable;
@@ -14415,6 +14433,11 @@ const renderPopupPanel = (h, _vm) => {
14415
14433
  const {
14416
14434
  maxFixedSize
14417
14435
  } = columnOpts;
14436
+ const resizableOpts = $xeTable.computeResizableOpts;
14437
+ const {
14438
+ minWidth: reMinWidth,
14439
+ maxWidth: reMaxWidth
14440
+ } = resizableOpts;
14418
14441
  const modalOpts = Object.assign({}, modalOptions);
14419
14442
  const slots = customOpts.slots || {};
14420
14443
  const headerSlot = slots.header;
@@ -14437,6 +14460,24 @@ const renderPopupPanel = (h, _vm) => {
14437
14460
  column
14438
14461
  }) : true;
14439
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
+ }
14440
14481
  const isChecked = column.renderVisible;
14441
14482
  const isIndeterminate = column.halfVisible;
14442
14483
  const colTitle = formatText(column.getTitle(), 1);
@@ -14509,11 +14550,13 @@ const renderPopupPanel = (h, _vm) => {
14509
14550
  }
14510
14551
  }, colTitle)]), allowResizable ? h('td', {
14511
14552
  class: 'vxe-table-custom-popup--column-item col--resizable'
14512
- }, [column.children && column.children.length ? h('span', '-') : VxeUIInputComponent ? h(VxeUIInputComponent, {
14553
+ }, [column.children && column.children.length ? h('span', '-') : VxeUINumberInputComponent ? h(VxeUINumberInputComponent, {
14513
14554
  props: {
14514
14555
  type: 'integer',
14515
14556
  disabled: isDisabled || isHidden,
14516
- value: column.renderResizeWidth
14557
+ value: column.renderResizeWidth,
14558
+ min: customMinWidth || undefined,
14559
+ max: customMaxWidth || undefined
14517
14560
  },
14518
14561
  on: {
14519
14562
  modelValue(value) {
@@ -14704,7 +14747,7 @@ const renderPopupPanel = (h, _vm) => {
14704
14747
  const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
14705
14748
  const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
14706
14749
  const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
14707
- const VxeUIInputComponent = core_.VxeUI.getComponent('VxeInput');
14750
+ const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeNumberInput');
14708
14751
  const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
14709
14752
  const VxeUIRadioGroupComponent = core_.VxeUI.getComponent('VxeRadioGroup');
14710
14753
  this.$nextTick(() => {
@@ -14726,7 +14769,7 @@ const renderPopupPanel = (h, _vm) => {
14726
14769
  if (!VxeUIButtonComponent) {
14727
14770
  errLog('vxe.error.reqComp', ['vxe-button']);
14728
14771
  }
14729
- if (!VxeUIInputComponent) {
14772
+ if (!VxeUINumberInputComponent) {
14730
14773
  errLog('vxe.error.reqComp', ['vxe-input']);
14731
14774
  }
14732
14775
  if (!VxeUITooltipComponent) {
@@ -20168,7 +20211,7 @@ function validErrorRuleValue(rule, val) {
20168
20211
  } = this;
20169
20212
  if (validOpts.msgMode === 'single') {
20170
20213
  const keys = Object.keys(validErrMaps);
20171
- const resMaps = validErrMaps;
20214
+ const resMaps = {};
20172
20215
  if (keys.length) {
20173
20216
  const firstKey = keys[0];
20174
20217
  resMaps[firstKey] = validErrMaps[firstKey];
@@ -21983,6 +22026,7 @@ function handleUupdateResize(_vm) {
21983
22026
  const VxeUILoadingComponent = core_.VxeUI.getComponent('VxeLoading');
21984
22027
  const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
21985
22028
  const $xeTable = this;
22029
+ const reactData = $xeTable;
21986
22030
  const {
21987
22031
  _e,
21988
22032
  $scopedSlots,
@@ -22027,13 +22071,20 @@ function handleUupdateResize(_vm) {
22027
22071
  loadingOpts,
22028
22072
  editRules
22029
22073
  } = $xeTable;
22074
+ const {
22075
+ dragRow,
22076
+ dragTipText
22077
+ } = reactData;
22030
22078
  const {
22031
22079
  leftList,
22032
22080
  rightList
22033
22081
  } = columnStore;
22034
22082
  const currLoading = this._isLoading || loading;
22035
22083
  const vSize = computeSize;
22084
+ const dragOpts = $xeTable.computeDragOpts;
22036
22085
  const virtualScrollBars = $xeTable.computeVirtualScrollBars;
22086
+ const dragSlots = dragOpts.slots || {};
22087
+ const rowTipSlot = dragSlots.rowTip;
22037
22088
  return h('div', {
22038
22089
  class: ['vxe-table', 'vxe-table--render-default', `tid_${tId}`, vSize ? `size--${vSize}` : '', `border--${tableBorder}`, {
22039
22090
  [`valid-msg--${validOpts.msgMode}`]: !!editRules,
@@ -22238,10 +22289,12 @@ function handleUupdateResize(_vm) {
22238
22289
  /**
22239
22290
  * 拖拽提示
22240
22291
  */
22241
- rowOpts.drag ? h('div', {
22292
+ rowOpts.drag && (dragRow || dragTipText) ? h('div', {
22242
22293
  ref: 'refRowDragTipElem',
22243
- class: 'vxe-table--row-drag-hint'
22244
- }, 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', {}, [
22245
22298
  /**
22246
22299
  * 提示相关
22247
22300
  */