vxe-table 4.3.13 → 4.4.0-beta.0

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 (67) hide show
  1. package/README.md +1 -1
  2. package/es/form/src/form-config-item.js +7 -2
  3. package/es/form/src/form-item.js +7 -2
  4. package/es/grid/src/grid.js +1 -1
  5. package/es/icon/style.css +1 -1
  6. package/es/select/src/select.js +7 -3
  7. package/es/style.css +1 -1
  8. package/es/style.min.css +1 -1
  9. package/es/table/src/body.js +4 -3
  10. package/es/table/src/table.js +6 -3
  11. package/es/tools/log.js +1 -1
  12. package/es/v-x-e-table/index.js +1 -1
  13. package/lib/form/src/form-config-item.js +7 -2
  14. package/lib/form/src/form-config-item.min.js +1 -1
  15. package/lib/form/src/form-item.js +7 -2
  16. package/lib/form/src/form-item.min.js +1 -1
  17. package/lib/grid/src/grid.js +1 -1
  18. package/lib/grid/src/grid.min.js +1 -1
  19. package/lib/icon/style/style.css +1 -1
  20. package/lib/icon/style/style.min.css +1 -1
  21. package/lib/index.umd.js +32 -16
  22. package/lib/index.umd.min.js +1 -1
  23. package/lib/select/src/select.js +5 -3
  24. package/lib/select/src/select.min.js +1 -1
  25. package/lib/style.css +1 -1
  26. package/lib/style.min.css +1 -1
  27. package/lib/table/src/body.js +4 -3
  28. package/lib/table/src/body.min.js +1 -1
  29. package/lib/table/src/table.js +6 -3
  30. package/lib/table/src/table.min.js +1 -1
  31. package/lib/tools/log.js +1 -1
  32. package/lib/tools/log.min.js +1 -1
  33. package/lib/v-x-e-table/index.js +1 -1
  34. package/lib/v-x-e-table/index.min.js +1 -1
  35. package/package.json +1 -1
  36. package/packages/form/src/form-config-item.ts +7 -2
  37. package/packages/form/src/form-item.ts +7 -2
  38. package/packages/grid/src/grid.ts +4 -4
  39. package/packages/select/src/select.ts +7 -3
  40. package/packages/table/src/body.ts +4 -3
  41. package/packages/table/src/column.ts +3 -3
  42. package/packages/table/src/props.ts +3 -3
  43. package/packages/table/src/table.ts +10 -7
  44. package/types/column.d.ts +71 -72
  45. package/types/component.d.ts +1 -7
  46. package/types/edit.d.ts +22 -22
  47. package/types/filter.d.ts +3 -3
  48. package/types/grid.d.ts +258 -250
  49. package/types/plugins/pro.d.ts +275 -275
  50. package/types/select.d.ts +20 -1
  51. package/types/table.d.ts +667 -630
  52. package/types/toolbar.d.ts +1 -1
  53. package/types/v-x-e-table/menus.d.ts +10 -10
  54. package/types/v-x-e-table/renderer.d.ts +51 -43
  55. package/types/validator.d.ts +22 -21
  56. /package/es/icon/style/{iconfont.1683246853825.ttf → iconfont.1684467973646.ttf} +0 -0
  57. /package/es/icon/style/{iconfont.1683246853825.woff → iconfont.1684467973646.woff} +0 -0
  58. /package/es/icon/style/{iconfont.1683246853825.woff2 → iconfont.1684467973646.woff2} +0 -0
  59. /package/es/{iconfont.1683246853825.ttf → iconfont.1684467973646.ttf} +0 -0
  60. /package/es/{iconfont.1683246853825.woff → iconfont.1684467973646.woff} +0 -0
  61. /package/es/{iconfont.1683246853825.woff2 → iconfont.1684467973646.woff2} +0 -0
  62. /package/lib/icon/style/{iconfont.1683246853825.ttf → iconfont.1684467973646.ttf} +0 -0
  63. /package/lib/icon/style/{iconfont.1683246853825.woff → iconfont.1684467973646.woff} +0 -0
  64. /package/lib/icon/style/{iconfont.1683246853825.woff2 → iconfont.1684467973646.woff2} +0 -0
  65. /package/lib/{iconfont.1683246853825.ttf → iconfont.1684467973646.ttf} +0 -0
  66. /package/lib/{iconfont.1683246853825.woff → iconfont.1684467973646.woff} +0 -0
  67. /package/lib/{iconfont.1683246853825.woff2 → iconfont.1684467973646.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -2263,7 +2263,7 @@ const GlobalConfig = {
2263
2263
  ;// CONCATENATED MODULE: ./packages/tools/log.ts
2264
2264
 
2265
2265
  function getLog(message, params) {
2266
- return `[vxe-table v${"4.3.13"}] ${conf.i18n(message, params)}`;
2266
+ return `[vxe-table v${"4.4.0-beta.0"}] ${conf.i18n(message, params)}`;
2267
2267
  }
2268
2268
  function outLog(type) {
2269
2269
  return function (message, params) {
@@ -4060,7 +4060,7 @@ const config = new VXETableConfig();
4060
4060
  const v = 'v4';
4061
4061
  const VXETable = {
4062
4062
  v,
4063
- version: "4.3.13",
4063
+ version: "4.4.0-beta.0",
4064
4064
  setup: setup,
4065
4065
  interceptor: interceptor,
4066
4066
  renderer: renderer,
@@ -10593,7 +10593,7 @@ function getOptUniqueId() {
10593
10593
  default: () => conf.select.transfer
10594
10594
  }
10595
10595
  },
10596
- emits: ['update:modelValue', 'change', 'clear'],
10596
+ emits: ['update:modelValue', 'change', 'clear', 'blur', 'focus'],
10597
10597
  setup(props, context) {
10598
10598
  const {
10599
10599
  slots,
@@ -11228,13 +11228,15 @@ function getOptUniqueId() {
11228
11228
  });
11229
11229
  }
11230
11230
  };
11231
- const focusEvent = () => {
11231
+ const focusEvent = evnt => {
11232
11232
  if (!props.disabled) {
11233
11233
  reactData.isActivated = true;
11234
11234
  }
11235
+ selectMethods.dispatchEvent('focus', {}, evnt);
11235
11236
  };
11236
- const blurEvent = () => {
11237
+ const blurEvent = evnt => {
11237
11238
  reactData.isActivated = false;
11239
+ selectMethods.dispatchEvent('blur', {}, evnt);
11238
11240
  };
11239
11241
  const modelSearchEvent = value => {
11240
11242
  reactData.searchValue = value;
@@ -16550,7 +16552,7 @@ dynamicApp.component('VxeTableColgroup', src_group);
16550
16552
 
16551
16553
 
16552
16554
  const tableComponentPropKeys = Object.keys(props);
16553
- const tableComponentMethodKeys = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'createData', 'createRow', 'revertData', 'clearData', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getData', 'getCheckboxRecords', 'getParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'isCheckedByCheckboxRow', 'isIndeterminateByCheckboxRow', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'setRadioRow', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'sort', 'clearSort', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'scrollTo', 'scrollToRow', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'openTooltip', 'focus', 'blur', 'connect'];
16555
+ const tableComponentMethodKeys = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'createData', 'createRow', 'revertData', 'clearData', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getData', 'getCheckboxRecords', 'getParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'isCheckedByCheckboxRow', 'isIndeterminateByCheckboxRow', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'setRadioRow', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'sort', 'clearSort', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'scrollTo', 'scrollToRow', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'openTooltip', 'focus', 'blur', 'connect'];
16554
16556
  const gridComponentEmits = [...emits, 'page-change', 'form-submit', 'form-submit-invalid', 'form-reset', 'form-collapse', 'form-toggle-collapse', 'proxy-query', 'proxy-delete', 'proxy-save', 'toolbar-button-click', 'toolbar-tool-click', 'zoom'];
16555
16557
  /* harmony default export */ var grid = ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
16556
16558
  name: 'VxeGrid',
@@ -20520,6 +20522,9 @@ const VxeFormConfigItem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.defin
20520
20522
  } = item;
20521
20523
  const compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null;
20522
20524
  const itemClassName = compConf ? compConf.itemClassName : '';
20525
+ const itemStyle = compConf ? compConf.itemStyle : null;
20526
+ const itemContentClassName = compConf ? compConf.itemContentClassName : '';
20527
+ const itemContentStyle = compConf ? compConf.itemContentStyle : null;
20523
20528
  const defaultSlot = slots ? slots.default : null;
20524
20529
  const titleSlot = slots ? slots.title : null;
20525
20530
  const span = item.span || allSpan;
@@ -20605,7 +20610,8 @@ const VxeFormConfigItem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.defin
20605
20610
  'is--hidden': folding && collapseAll,
20606
20611
  'is--active': isActivetem($xeform, item),
20607
20612
  'is--error': showError
20608
- }]
20613
+ }],
20614
+ style: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemStyle) ? itemStyle(params) : itemStyle
20609
20615
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
20610
20616
  class: 'vxe-form--item-inner'
20611
20617
  }, [title || titleSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
@@ -20618,7 +20624,8 @@ const VxeFormConfigItem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.defin
20618
20624
  title: showTitle ? getFuncText(title) : null,
20619
20625
  ...ons
20620
20626
  }, renderTitle($xeform, item)) : null, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
20621
- class: ['vxe-form--item-content', align ? `align--${align}` : null]
20627
+ class: ['vxe-form--item-content', align ? `align--${align}` : '', itemContentClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemContentClassName) ? itemContentClassName(params) : itemContentClassName : ''],
20628
+ style: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemContentStyle) ? itemContentStyle(params) : itemContentStyle
20622
20629
  }, contentVNs)])]);
20623
20630
  };
20624
20631
  const $xeformconfigitem = {
@@ -21467,6 +21474,9 @@ const formItemProps = {
21467
21474
  } = item;
21468
21475
  const compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null;
21469
21476
  const itemClassName = compConf ? compConf.itemClassName : '';
21477
+ const itemStyle = compConf ? compConf.itemStyle : null;
21478
+ const itemContentClassName = compConf ? compConf.itemContentClassName : '';
21479
+ const itemContentStyle = compConf ? compConf.itemContentStyle : null;
21470
21480
  const defaultSlot = slots ? slots.default : null;
21471
21481
  const titleSlot = slots ? slots.title : null;
21472
21482
  const span = item.span || props.span;
@@ -21540,7 +21550,8 @@ const formItemProps = {
21540
21550
  'is--hidden': folding && collapseAll,
21541
21551
  'is--active': isActivetem($xeform, item),
21542
21552
  'is--error': showError
21543
- }]
21553
+ }],
21554
+ style: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemStyle) ? itemStyle(params) : itemStyle
21544
21555
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
21545
21556
  class: 'vxe-form--item-inner'
21546
21557
  }, [title || titleSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
@@ -21553,7 +21564,8 @@ const formItemProps = {
21553
21564
  title: showTitle ? getFuncText(title) : null,
21554
21565
  ...ons
21555
21566
  }, renderTitle($xeform, item)) : null, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
21556
- class: ['vxe-form--item-content', align ? `align--${align}` : null]
21567
+ class: ['vxe-form--item-content', align ? `align--${align}` : '', itemContentClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemContentClassName) ? itemContentClassName(params) : itemContentClassName : ''],
21568
+ style: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemContentStyle) ? itemContentStyle(params) : itemContentStyle
21557
21569
  }, contentVNs)])]);
21558
21570
  };
21559
21571
  const renderVN = () => {
@@ -23023,7 +23035,8 @@ const lineOffsetSizes = {
23023
23035
  } = rowOpts;
23024
23036
  const renderOpts = editRender || cellRender;
23025
23037
  const compConf = renderOpts ? VXETable.renderer.get(renderOpts.name) : null;
23026
- const cellClassName = compConf ? compConf.cellClassName : '';
23038
+ const compCellClassName = compConf ? compConf.cellClassName : '';
23039
+ const compCellStyle = compConf ? compConf.cellStyle : '';
23027
23040
  const showAllTip = tooltipOpts.showAll;
23028
23041
  const columnIndex = $xetable.getColumnIndex(column);
23029
23042
  const _columnIndex = $xetable.getVTColumnIndex(column);
@@ -23205,12 +23218,12 @@ const lineOffsetSizes = {
23205
23218
  'col--actived': editConfig && isEdit && actived.row === row && (actived.column === column || editOpts.mode === 'row'),
23206
23219
  'col--valid-error': hasValidError,
23207
23220
  'col--current': currentColumn === column
23208
- }, getPropClass(cellClassName, params), getPropClass(className, params), getPropClass(allCellClassName, params)],
23221
+ }, getPropClass(compCellClassName, params), getPropClass(className, params), getPropClass(allCellClassName, params)],
23209
23222
  key: columnKey || columnOpts.useKey ? column.id : $columnIndex,
23210
23223
  ...attrs,
23211
23224
  style: Object.assign({
23212
23225
  height: hasEllipsis && (scrollYRHeight || rowHeight) ? `${scrollYRHeight || rowHeight}px` : ''
23213
- }, cellStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(cellStyle) ? cellStyle(params) : cellStyle : null),
23226
+ }, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(compCellStyle) ? compCellStyle(params) : compCellStyle, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(cellStyle) ? cellStyle(params) : cellStyle),
23214
23227
  ...tdOns
23215
23228
  }, tdVNs);
23216
23229
  };
@@ -28235,7 +28248,7 @@ const visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
28235
28248
  return new Promise(resolve => {
28236
28249
  // 还原滚动条位置
28237
28250
  if (lastScrollLeft || lastScrollTop) {
28238
- return restoreScrollLocation($xetable, lastScrollLeft, lastScrollTop).then(resolve).then(() => {
28251
+ return restoreScrollLocation($xetable, lastScrollLeft, lastScrollTop).then().then(() => {
28239
28252
  // 存在滚动行为未结束情况
28240
28253
  setTimeout(resolve, 30);
28241
28254
  });
@@ -28758,13 +28771,16 @@ const visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
28758
28771
  * 判断指定列是否为筛选状态,如果为空则判断所有列
28759
28772
  * @param {String} fieldOrColumn 字段名
28760
28773
  */
28761
- isFilter(fieldOrColumn) {
28774
+ isActiveFilterByColumn(fieldOrColumn) {
28762
28775
  const column = handleFieldOrColumn($xetable, fieldOrColumn);
28763
28776
  if (column) {
28764
28777
  return column.filters && column.filters.some(option => option.checked);
28765
28778
  }
28766
28779
  return $xetable.getCheckedFilters().length > 0;
28767
28780
  },
28781
+ isFilter(fieldOrColumn) {
28782
+ return tableMethods.isActiveFilterByColumn(fieldOrColumn);
28783
+ },
28768
28784
  /**
28769
28785
  * 判断展开行是否懒加载完成
28770
28786
  * @param {Row} row 行对象
@@ -30597,7 +30613,7 @@ const visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
30597
30613
  tooltipStore
30598
30614
  } = reactData;
30599
30615
  const cell = evnt.currentTarget;
30600
- handleTargetEnterEvent(tooltipStore.column !== column || tooltipStore.row);
30616
+ handleTargetEnterEvent(tooltipStore.column !== column || !!tooltipStore.row);
30601
30617
  if (tooltipStore.column !== column || !tooltipStore.visible) {
30602
30618
  handleTooltip(evnt, cell, cell.querySelector('.vxe-cell--item') || cell.children[0], null, params);
30603
30619
  }