vxe-table 3.18.18 → 3.18.20

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 (37) hide show
  1. package/es/style.css +1 -1
  2. package/es/table/module/filter/mixin.js +21 -5
  3. package/es/table/module/filter/panel.js +6 -5
  4. package/es/table/module/menu/panel.js +27 -13
  5. package/es/table/src/cell.js +17 -10
  6. package/es/table/src/table.js +1 -1
  7. package/es/ui/index.js +1 -1
  8. package/es/ui/src/log.js +1 -1
  9. package/lib/index.umd.js +63 -29
  10. package/lib/index.umd.min.js +1 -1
  11. package/lib/style.css +1 -1
  12. package/lib/table/module/filter/mixin.js +21 -5
  13. package/lib/table/module/filter/mixin.min.js +1 -1
  14. package/lib/table/module/filter/panel.js +5 -4
  15. package/lib/table/module/filter/panel.min.js +1 -1
  16. package/lib/table/module/menu/panel.js +16 -9
  17. package/lib/table/module/menu/panel.min.js +1 -1
  18. package/lib/table/src/cell.js +18 -7
  19. package/lib/table/src/cell.min.js +1 -1
  20. package/lib/table/src/table.js +1 -1
  21. package/lib/table/src/table.min.js +1 -1
  22. package/lib/ui/index.js +1 -1
  23. package/lib/ui/index.min.js +1 -1
  24. package/lib/ui/src/log.js +1 -1
  25. package/lib/ui/src/log.min.js +1 -1
  26. package/package.json +2 -2
  27. package/packages/table/module/filter/mixin.ts +21 -5
  28. package/packages/table/module/filter/panel.ts +6 -5
  29. package/packages/table/module/menu/panel.ts +35 -21
  30. package/packages/table/src/cell.ts +17 -10
  31. package/packages/table/src/table.ts +1 -1
  32. /package/es/{iconfont.1758524611561.ttf → iconfont.1758850648674.ttf} +0 -0
  33. /package/es/{iconfont.1758524611561.woff → iconfont.1758850648674.woff} +0 -0
  34. /package/es/{iconfont.1758524611561.woff2 → iconfont.1758850648674.woff2} +0 -0
  35. /package/lib/{iconfont.1758524611561.ttf → iconfont.1758850648674.ttf} +0 -0
  36. /package/lib/{iconfont.1758524611561.woff → iconfont.1758850648674.woff} +0 -0
  37. /package/lib/{iconfont.1758524611561.woff2 → iconfont.1758850648674.woff2} +0 -0
@@ -65,8 +65,11 @@ export default {
65
65
  */
66
66
  triggerFilterEvent(evnt, column, params) {
67
67
  const $xeTable = this;
68
+ const $xeGrid = $xeTable.$xeGrid;
69
+ const $xeGantt = $xeTable.$xeGantt;
68
70
  const reactData = $xeTable;
69
71
  const internalData = $xeTable;
72
+ const $xeGGWrapper = $xeGrid || $xeGantt;
70
73
  const { filterStore } = this;
71
74
  if (filterStore.column === column && filterStore.visible) {
72
75
  filterStore.visible = false;
@@ -78,12 +81,14 @@ export default {
78
81
  filterStore.visible = false;
79
82
  }
80
83
  else {
81
- const el = $xeTable.$refs.refElem;
84
+ const tableEl = $xeTable.$refs.refElem;
82
85
  const { scrollTop, scrollLeft, visibleHeight, visibleWidth } = getDomNode();
83
86
  const filterOpts = $xeTable.computeFilterOpts;
84
87
  const { transfer } = filterOpts;
85
- const tableRect = el.getBoundingClientRect();
88
+ const tableRect = tableEl.getBoundingClientRect();
86
89
  const btnElem = evnt.currentTarget;
90
+ const filterRender = column ? column.filterRender : null;
91
+ const compConf = filterRender && isEnableConf(filterRender) ? renderer.get(filterRender.name) : null;
87
92
  $xeTable.handleFilterOptions(column);
88
93
  internalData._currFilterParams = params;
89
94
  filterStore.style = null;
@@ -121,18 +126,29 @@ export default {
121
126
  else {
122
127
  left = btnRect.left - tableRect.left - centerWidth;
123
128
  top = btnRect.top - tableRect.top + btnElem.clientHeight;
124
- maxHeight = Math.max(40, el.clientHeight - top - (filterHeadElem ? filterHeadElem.clientHeight : 0) - (filterFootElem ? filterFootElem.clientHeight : 0) - 14);
129
+ maxHeight = Math.max(40, tableEl.clientHeight - top - (filterHeadElem ? filterHeadElem.clientHeight : 0) - (filterFootElem ? filterFootElem.clientHeight : 0) - 14);
125
130
  if (left < 1) {
126
131
  left = 1;
127
132
  }
128
- else if (left > (el.clientWidth - filterWidth - 1)) {
129
- left = el.clientWidth - filterWidth - 1;
133
+ else if (left > (tableEl.clientWidth - filterWidth - 1)) {
134
+ left = tableEl.clientWidth - filterWidth - 1;
135
+ }
136
+ if ($xeGGWrapper) {
137
+ const wrapperEl = $xeGGWrapper.$refs.refElem;
138
+ if (wrapperEl) {
139
+ const wrapperRect = wrapperEl.getBoundingClientRect();
140
+ top += tableRect.top - wrapperRect.top;
141
+ }
130
142
  }
131
143
  }
132
144
  filterStore.style = {
133
145
  top: toCssUnit(top),
134
146
  left: toCssUnit(left)
135
147
  };
148
+ // 筛选面板是自适应表格高度
149
+ if (compConf ? !compConf.tableFilterAutoHeight : false) {
150
+ maxHeight = 0;
151
+ }
136
152
  // 判断面板不能大于表格高度
137
153
  filterStore.maxHeight = maxHeight;
138
154
  });
@@ -1,5 +1,6 @@
1
1
  import { VxeUI } from '../../../ui';
2
- import { formatText, isEnableConf, getClass } from '../../../ui/src/utils';
2
+ import { formatText, isEnableConf } from '../../../ui/src/utils';
3
+ import { getPropClass, toCssUnit } from '../../../ui/src/dom';
3
4
  import { getSlotVNs } from '../../../ui/src/vn';
4
5
  import { warnLog } from '../../../ui/src/log';
5
6
  const { getI18n, getIcon, renderer, globalMixins } = VxeUI;
@@ -19,7 +20,7 @@ function renderOptions($xeFilterPanel, h, filterRender, compConf) {
19
20
  class: 'vxe-table--filter-template',
20
21
  style: maxHeight
21
22
  ? {
22
- maxHeight: `${maxHeight}px`
23
+ maxHeight: toCssUnit(maxHeight)
23
24
  }
24
25
  : {}
25
26
  }, $xeTable.callSlot(filterSlot, params, h))
@@ -31,7 +32,7 @@ function renderOptions($xeFilterPanel, h, filterRender, compConf) {
31
32
  class: 'vxe-table--filter-template',
32
33
  style: maxHeight
33
34
  ? {
34
- maxHeight: `${maxHeight}px`
35
+ maxHeight: toCssUnit(maxHeight)
35
36
  }
36
37
  : {}
37
38
  }, getSlotVNs(rtFilter.call($xeTable, h, filterRender, params)))
@@ -72,7 +73,7 @@ function renderOptions($xeFilterPanel, h, filterRender, compConf) {
72
73
  class: 'vxe-table--filter-body',
73
74
  style: maxHeight
74
75
  ? {
75
- maxHeight: `${maxHeight}px`
76
+ maxHeight: toCssUnit(maxHeight)
76
77
  }
77
78
  : {}
78
79
  }, filterStore.options.map((item) => {
@@ -196,7 +197,7 @@ export default {
196
197
  'filter--prevent-default',
197
198
  className,
198
199
  compConf && compConf.className ? compConf.className : '',
199
- getClass(filterClassName, params),
200
+ getPropClass(filterClassName, params),
200
201
  {
201
202
  [`size--${vSize}`]: vSize,
202
203
  'is--animat': tableProps.animat,
@@ -1,5 +1,7 @@
1
1
  import { VxeUI } from '../../../ui';
2
+ import XEUtils from 'xe-utils';
2
3
  import { getFuncText } from '../../../ui/src/utils';
4
+ import { getSlotVNs } from '../../../ui/src/vn';
3
5
  const { getIcon, renderEmptyElement } = VxeUI;
4
6
  export default {
5
7
  name: 'VxeTableMenuPanel',
@@ -52,7 +54,9 @@ export default {
52
54
  }, options.map((item, index) => {
53
55
  const hasChildMenus = item.children && item.children.some((child) => child.visible !== false);
54
56
  const prefixOpts = Object.assign({}, item.prefixConfig);
57
+ const prefixIcon = prefixOpts.icon || item.prefixIcon;
55
58
  const suffixOpts = Object.assign({}, item.suffixConfig);
59
+ const suffixIcon = suffixOpts.icon || item.suffixIcon;
56
60
  const menuContent = getFuncText(item.name);
57
61
  return item.visible === false
58
62
  ? renderEmptyElement($xeTable)
@@ -80,9 +84,11 @@ export default {
80
84
  h('div', {
81
85
  class: ['vxe-context-menu--link-prefix', prefixOpts.className || '']
82
86
  }, [
83
- h('i', {
84
- class: prefixOpts.icon || item.prefixIcon
85
- }),
87
+ prefixIcon && XEUtils.isFunction(prefixIcon)
88
+ ? h('span', {}, getSlotVNs(prefixIcon.call($xeTable, {})))
89
+ : h('i', {
90
+ class: prefixIcon
91
+ }),
86
92
  prefixOpts.content ? h('span', {}, `${prefixOpts.content}`) : renderEmptyElement($xeTable)
87
93
  ]),
88
94
  h('span', {
@@ -94,20 +100,24 @@ export default {
94
100
  h('div', {
95
101
  class: ['vxe-context-menu--link-suffix', suffixOpts.className || '']
96
102
  }, [
97
- h('i', {
98
- class: (suffixOpts.icon || item.suffixIcon) || (hasChildMenus ? getIcon().TABLE_MENU_OPTIONS : '')
99
- }),
103
+ suffixIcon && XEUtils.isFunction(suffixIcon)
104
+ ? h('span', {}, getSlotVNs(suffixIcon.call($xeTable, {})))
105
+ : h('i', {
106
+ class: suffixIcon || (hasChildMenus ? getIcon().TABLE_MENU_OPTIONS : '')
107
+ }),
100
108
  suffixOpts.content ? h('span', `${suffixOpts.content}`) : renderEmptyElement($xeTable)
101
109
  ])
102
110
  ]),
103
- hasChildMenus
111
+ hasChildMenus && item.children
104
112
  ? h('ul', {
105
113
  class: ['vxe-table--context-menu-clild-wrapper', {
106
114
  'is--show': item === ctxMenuStore.selected && ctxMenuStore.showChild
107
115
  }]
108
116
  }, item.children.map((child, cIndex) => {
109
117
  const childPrefixOpts = Object.assign({}, child.prefixConfig);
118
+ const childPrefixIcon = childPrefixOpts.icon || child.prefixIcon;
110
119
  const childSuffixOpts = Object.assign({}, child.suffixConfig);
120
+ const childSuffixIcon = childSuffixOpts.icon || child.suffixIcon;
111
121
  const childMenuContent = getFuncText(child.name);
112
122
  return child.visible === false
113
123
  ? null
@@ -135,9 +145,11 @@ export default {
135
145
  h('div', {
136
146
  class: ['vxe-context-menu--link-prefix', childPrefixOpts.className || '']
137
147
  }, [
138
- h('i', {
139
- class: childPrefixOpts.icon || child.prefixIcon
140
- }),
148
+ childPrefixIcon && XEUtils.isFunction(childPrefixIcon)
149
+ ? h('span', {}, getSlotVNs(childPrefixIcon.call($xeTable, {})))
150
+ : h('i', {
151
+ class: childPrefixIcon
152
+ }),
141
153
  childPrefixOpts.content ? h('span', `${childPrefixOpts.content}`) : renderEmptyElement($xeTable)
142
154
  ]),
143
155
  h('span', {
@@ -149,9 +161,11 @@ export default {
149
161
  h('div', {
150
162
  class: ['vxe-context-menu--link-suffix', childSuffixOpts.className || '']
151
163
  }, [
152
- h('i', {
153
- class: childSuffixOpts.icon
154
- }),
164
+ childSuffixIcon && XEUtils.isFunction(childSuffixIcon)
165
+ ? h('span', {}, getSlotVNs(childSuffixIcon.call($xeTable, {})))
166
+ : h('i', {
167
+ class: childSuffixIcon
168
+ }),
155
169
  childSuffixOpts.content ? h('span', `${childSuffixOpts.content}`) : renderEmptyElement($xeTable)
156
170
  ])
157
171
  ])
@@ -281,7 +281,7 @@ function renderCellHandle(h, params) {
281
281
  case 'html':
282
282
  return isDeepCell ? Cell.renderDeepHTMLCell(h, params) : Cell.renderHTMLCell(h, params);
283
283
  }
284
- if (isEnableConf(editConfig) && editRender) {
284
+ if (editConfig && isEnableConf(editOpts) && editRender) {
285
285
  return editOpts.mode === 'cell' ? (isDeepCell ? Cell.renderDeepCellEdit(h, params) : Cell.renderCellEdit(h, params)) : (isDeepCell ? Cell.renderDeepRowEdit(h, params) : Cell.renderRowEdit(h, params));
286
286
  }
287
287
  return isDeepCell ? Cell.renderDeepCell(h, params) : Cell.renderDefaultCell(h, params);
@@ -290,6 +290,7 @@ function renderHeaderHandle(h, params) {
290
290
  const { column, $table } = params;
291
291
  const tableProps = $table;
292
292
  const { editConfig } = tableProps;
293
+ const editOpts = $table.computeEditOpts;
293
294
  const { type, filters, sortable, editRender } = column;
294
295
  switch (type) {
295
296
  case 'seq':
@@ -310,7 +311,7 @@ function renderHeaderHandle(h, params) {
310
311
  }
311
312
  break;
312
313
  }
313
- if (editConfig && editRender) {
314
+ if (editConfig && isEnableConf(editOpts) && editRender) {
314
315
  return Cell.renderEditHeader(h, params);
315
316
  }
316
317
  else if (filters && sortable) {
@@ -364,11 +365,14 @@ export const Cell = {
364
365
  },
365
366
  renderDefaultCell(h, params) {
366
367
  const { $table, row, column } = params;
368
+ const tableProps = $table;
367
369
  const tableReactData = $table;
368
370
  const tableInternalData = $table;
369
371
  const { isRowGroupStatus } = tableReactData;
372
+ const { editConfig } = tableProps;
373
+ const editOpts = $table.computeEditOpts;
370
374
  const { field, slots, editRender, cellRender, rowGroupNode, aggFunc } = column;
371
- const renderOpts = editRender || cellRender;
375
+ const renderOpts = editConfig && isEnableConf(editOpts) && editRender ? editRender : cellRender;
372
376
  const defaultSlot = slots ? slots.default : null;
373
377
  const gcSlot = slots ? (slots.groupContent || slots['group-content']) : null;
374
378
  let cellValue = '';
@@ -1094,8 +1098,9 @@ export const Cell = {
1094
1098
  }
1095
1099
  let editIconVNs = [];
1096
1100
  if (isEnableConf(editConfig)) {
1101
+ const { showAsterisk, showIcon, icon } = editOpts;
1097
1102
  editIconVNs = [
1098
- isRequired && editOpts.showAsterisk
1103
+ isRequired && showAsterisk
1099
1104
  ? h('i', {
1100
1105
  class: 'vxe-cell--required-icon'
1101
1106
  }, [
@@ -1104,14 +1109,16 @@ export const Cell = {
1104
1109
  })
1105
1110
  ])
1106
1111
  : renderEmptyElement($table),
1107
- isEnableConf(editRender) && editOpts.showIcon
1112
+ isEnableConf(editRender) && showIcon
1108
1113
  ? h('i', {
1109
1114
  class: 'vxe-cell--edit-icon'
1110
- }, [
1111
- h('i', {
1112
- class: editOpts.icon || getIcon().TABLE_EDIT
1113
- })
1114
- ])
1115
+ }, XEUtils.isFunction(icon)
1116
+ ? getSlotVNs(icon({}))
1117
+ : [
1118
+ h('i', {
1119
+ class: icon || getIcon().TABLE_EDIT
1120
+ })
1121
+ ])
1115
1122
  : renderEmptyElement($table)
1116
1123
  ];
1117
1124
  }
@@ -1757,7 +1757,7 @@ export default {
1757
1757
  }
1758
1758
  }
1759
1759
  if ($xeGGWrapper) {
1760
- const popupContainerElem = $xeGantt.$refs.refPopupContainerElem;
1760
+ const popupContainerElem = $xeGGWrapper.$refs.refPopupContainerElem;
1761
1761
  const popupWrapperEl = $xeTable.$refs.refPopupWrapperElem;
1762
1762
  if (popupContainerElem) {
1763
1763
  if (popupWrapperEl) {
package/es/ui/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  import { getFuncText } from './src/utils';
3
- export const version = "3.18.18";
3
+ export const version = "3.18.19";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
package/es/ui/src/log.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const version = `table v${"3.18.18"}`;
3
+ const version = `table v${"3.18.19"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/index.umd.js CHANGED
@@ -2002,7 +2002,7 @@ function getClass(property, params) {
2002
2002
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2003
2003
 
2004
2004
 
2005
- const version = "3.18.18";
2005
+ const version = "3.18.19";
2006
2006
  core_.VxeUI.version = version;
2007
2007
  core_.VxeUI.tableVersion = version;
2008
2008
  core_.VxeUI.setConfig({
@@ -2513,7 +2513,7 @@ function getTpImg() {
2513
2513
  return tpImgEl;
2514
2514
  }
2515
2515
  function getPropClass(property, params) {
2516
- return property ? XEUtils.isFunction(property) ? property(params) : property : '';
2516
+ return property ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(property) ? property(params) : property : '';
2517
2517
  }
2518
2518
  function getClsRE(cls) {
2519
2519
  if (!reClsMap[cls]) {
@@ -2689,7 +2689,7 @@ function isNodeElement(elem) {
2689
2689
  const {
2690
2690
  log: log_log
2691
2691
  } = core_.VxeUI;
2692
- const log_version = `table v${"3.18.18"}`;
2692
+ const log_version = `table v${"3.18.19"}`;
2693
2693
  const warnLog = log_log.create('warn', log_version);
2694
2694
  const errLog = log_log.create('error', log_version);
2695
2695
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -4103,7 +4103,7 @@ function renderCellHandle(h, params) {
4103
4103
  case 'html':
4104
4104
  return isDeepCell ? Cell.renderDeepHTMLCell(h, params) : Cell.renderHTMLCell(h, params);
4105
4105
  }
4106
- if (isEnableConf(editConfig) && editRender) {
4106
+ if (editConfig && isEnableConf(editOpts) && editRender) {
4107
4107
  return editOpts.mode === 'cell' ? isDeepCell ? Cell.renderDeepCellEdit(h, params) : Cell.renderCellEdit(h, params) : isDeepCell ? Cell.renderDeepRowEdit(h, params) : Cell.renderRowEdit(h, params);
4108
4108
  }
4109
4109
  return isDeepCell ? Cell.renderDeepCell(h, params) : Cell.renderDefaultCell(h, params);
@@ -4117,6 +4117,7 @@ function renderHeaderHandle(h, params) {
4117
4117
  const {
4118
4118
  editConfig
4119
4119
  } = tableProps;
4120
+ const editOpts = $table.computeEditOpts;
4120
4121
  const {
4121
4122
  type,
4122
4123
  filters,
@@ -4140,7 +4141,7 @@ function renderHeaderHandle(h, params) {
4140
4141
  }
4141
4142
  break;
4142
4143
  }
4143
- if (editConfig && editRender) {
4144
+ if (editConfig && isEnableConf(editOpts) && editRender) {
4144
4145
  return Cell.renderEditHeader(h, params);
4145
4146
  } else if (filters && sortable) {
4146
4147
  return Cell.renderSortAndFilterHeader(h, params);
@@ -4204,11 +4205,16 @@ const Cell = {
4204
4205
  row,
4205
4206
  column
4206
4207
  } = params;
4208
+ const tableProps = $table;
4207
4209
  const tableReactData = $table;
4208
4210
  const tableInternalData = $table;
4209
4211
  const {
4210
4212
  isRowGroupStatus
4211
4213
  } = tableReactData;
4214
+ const {
4215
+ editConfig
4216
+ } = tableProps;
4217
+ const editOpts = $table.computeEditOpts;
4212
4218
  const {
4213
4219
  field,
4214
4220
  slots,
@@ -4217,7 +4223,7 @@ const Cell = {
4217
4223
  rowGroupNode,
4218
4224
  aggFunc
4219
4225
  } = column;
4220
- const renderOpts = editRender || cellRender;
4226
+ const renderOpts = editConfig && isEnableConf(editOpts) && editRender ? editRender : cellRender;
4221
4227
  const defaultSlot = slots ? slots.default : null;
4222
4228
  const gcSlot = slots ? slots.groupContent || slots['group-content'] : null;
4223
4229
  let cellValue = '';
@@ -5126,14 +5132,19 @@ const Cell = {
5126
5132
  }
5127
5133
  let editIconVNs = [];
5128
5134
  if (isEnableConf(editConfig)) {
5129
- editIconVNs = [isRequired && editOpts.showAsterisk ? h('i', {
5135
+ const {
5136
+ showAsterisk,
5137
+ showIcon,
5138
+ icon
5139
+ } = editOpts;
5140
+ editIconVNs = [isRequired && showAsterisk ? h('i', {
5130
5141
  class: 'vxe-cell--required-icon'
5131
5142
  }, [h('i', {
5132
5143
  class: 'vxe-cell--required-icon'
5133
- })]) : renderEmptyElement($table), isEnableConf(editRender) && editOpts.showIcon ? h('i', {
5144
+ })]) : renderEmptyElement($table), isEnableConf(editRender) && showIcon ? h('i', {
5134
5145
  class: 'vxe-cell--edit-icon'
5135
- }, [h('i', {
5136
- class: editOpts.icon || cell_getIcon().TABLE_EDIT
5146
+ }, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(icon) ? getSlotVNs(icon({})) : [h('i', {
5147
+ class: icon || cell_getIcon().TABLE_EDIT
5137
5148
  })]) : renderEmptyElement($table)];
5138
5149
  }
5139
5150
  return renderHeaderCellBaseVNs(h, params, editIconVNs.concat(Cell.renderHeaderTitle(h, params)).concat(sortable ? Cell.renderSortIcon(h, params) : []).concat(filters ? Cell.renderFilterIcon(h, params) : []));
@@ -22790,6 +22801,7 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
22790
22801
 
22791
22802
 
22792
22803
 
22804
+
22793
22805
  const {
22794
22806
  getI18n: filter_panel_getI18n,
22795
22807
  getIcon: filter_panel_getIcon,
@@ -22819,14 +22831,14 @@ function renderOptions($xeFilterPanel, h, filterRender, compConf) {
22819
22831
  return [h('div', {
22820
22832
  class: 'vxe-table--filter-template',
22821
22833
  style: maxHeight ? {
22822
- maxHeight: `${maxHeight}px`
22834
+ maxHeight: toCssUnit(maxHeight)
22823
22835
  } : {}
22824
22836
  }, $xeTable.callSlot(filterSlot, params, h))];
22825
22837
  } else if (rtFilter) {
22826
22838
  return [h('div', {
22827
22839
  class: 'vxe-table--filter-template',
22828
22840
  style: maxHeight ? {
22829
- maxHeight: `${maxHeight}px`
22841
+ maxHeight: toCssUnit(maxHeight)
22830
22842
  } : {}
22831
22843
  }, getSlotVNs(rtFilter.call($xeTable, h, filterRender, params)))];
22832
22844
  }
@@ -22854,7 +22866,7 @@ function renderOptions($xeFilterPanel, h, filterRender, compConf) {
22854
22866
  }, filter_panel_getI18n('vxe.table.allFilter'))]))]), h('ul', {
22855
22867
  class: 'vxe-table--filter-body',
22856
22868
  style: maxHeight ? {
22857
- maxHeight: `${maxHeight}px`
22869
+ maxHeight: toCssUnit(maxHeight)
22858
22870
  } : {}
22859
22871
  }, filterStore.options.map(item => {
22860
22872
  const isChecked = item._checked;
@@ -22977,7 +22989,7 @@ function renderFooter($xeFilterPanel, h) {
22977
22989
  } = filterOpts;
22978
22990
  return h('div', {
22979
22991
  ref: 'refElem',
22980
- class: ['vxe-table--filter-wrapper', 'filter--prevent-default', className, compConf && compConf.className ? compConf.className : '', getClass(filterClassName, params), {
22992
+ class: ['vxe-table--filter-wrapper', 'filter--prevent-default', className, compConf && compConf.className ? compConf.className : '', getPropClass(filterClassName, params), {
22981
22993
  [`size--${vSize}`]: vSize,
22982
22994
  'is--animat': tableProps.animat,
22983
22995
  'is--multiple': multiple,
@@ -23810,6 +23822,8 @@ const {
23810
23822
  ;// CONCATENATED MODULE: ./packages/table/module/menu/panel.ts
23811
23823
 
23812
23824
 
23825
+
23826
+
23813
23827
  const {
23814
23828
  getIcon: menu_panel_getIcon,
23815
23829
  renderEmptyElement: menu_panel_renderEmptyElement
@@ -23872,7 +23886,9 @@ const {
23872
23886
  }, options.map((item, index) => {
23873
23887
  const hasChildMenus = item.children && item.children.some(child => child.visible !== false);
23874
23888
  const prefixOpts = Object.assign({}, item.prefixConfig);
23889
+ const prefixIcon = prefixOpts.icon || item.prefixIcon;
23875
23890
  const suffixOpts = Object.assign({}, item.suffixConfig);
23891
+ const suffixIcon = suffixOpts.icon || item.suffixIcon;
23876
23892
  const menuContent = getFuncText(item.name);
23877
23893
  return item.visible === false ? menu_panel_renderEmptyElement($xeTable) : h('li', {
23878
23894
  class: [item.className, {
@@ -23895,8 +23911,8 @@ const {
23895
23911
  }
23896
23912
  }, [h('div', {
23897
23913
  class: ['vxe-context-menu--link-prefix', prefixOpts.className || '']
23898
- }, [h('i', {
23899
- class: prefixOpts.icon || item.prefixIcon
23914
+ }, [prefixIcon && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(prefixIcon) ? h('span', {}, getSlotVNs(prefixIcon.call($xeTable, {}))) : h('i', {
23915
+ class: prefixIcon
23900
23916
  }), prefixOpts.content ? h('span', {}, `${prefixOpts.content}`) : menu_panel_renderEmptyElement($xeTable)]), h('span', {
23901
23917
  class: 'vxe-context-menu--link-content',
23902
23918
  attrs: {
@@ -23904,15 +23920,17 @@ const {
23904
23920
  }
23905
23921
  }, menuContent), h('div', {
23906
23922
  class: ['vxe-context-menu--link-suffix', suffixOpts.className || '']
23907
- }, [h('i', {
23908
- class: suffixOpts.icon || item.suffixIcon || (hasChildMenus ? menu_panel_getIcon().TABLE_MENU_OPTIONS : '')
23909
- }), suffixOpts.content ? h('span', `${suffixOpts.content}`) : menu_panel_renderEmptyElement($xeTable)])]), hasChildMenus ? h('ul', {
23923
+ }, [suffixIcon && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(suffixIcon) ? h('span', {}, getSlotVNs(suffixIcon.call($xeTable, {}))) : h('i', {
23924
+ class: suffixIcon || (hasChildMenus ? menu_panel_getIcon().TABLE_MENU_OPTIONS : '')
23925
+ }), suffixOpts.content ? h('span', `${suffixOpts.content}`) : menu_panel_renderEmptyElement($xeTable)])]), hasChildMenus && item.children ? h('ul', {
23910
23926
  class: ['vxe-table--context-menu-clild-wrapper', {
23911
23927
  'is--show': item === ctxMenuStore.selected && ctxMenuStore.showChild
23912
23928
  }]
23913
23929
  }, item.children.map((child, cIndex) => {
23914
23930
  const childPrefixOpts = Object.assign({}, child.prefixConfig);
23931
+ const childPrefixIcon = childPrefixOpts.icon || child.prefixIcon;
23915
23932
  const childSuffixOpts = Object.assign({}, child.suffixConfig);
23933
+ const childSuffixIcon = childSuffixOpts.icon || child.suffixIcon;
23916
23934
  const childMenuContent = getFuncText(child.name);
23917
23935
  return child.visible === false ? null : h('li', {
23918
23936
  class: [child.className, {
@@ -23935,8 +23953,8 @@ const {
23935
23953
  }
23936
23954
  }, [h('div', {
23937
23955
  class: ['vxe-context-menu--link-prefix', childPrefixOpts.className || '']
23938
- }, [h('i', {
23939
- class: childPrefixOpts.icon || child.prefixIcon
23956
+ }, [childPrefixIcon && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(childPrefixIcon) ? h('span', {}, getSlotVNs(childPrefixIcon.call($xeTable, {}))) : h('i', {
23957
+ class: childPrefixIcon
23940
23958
  }), childPrefixOpts.content ? h('span', `${childPrefixOpts.content}`) : menu_panel_renderEmptyElement($xeTable)]), h('span', {
23941
23959
  class: 'vxe-context-menu--link-content',
23942
23960
  attrs: {
@@ -23944,8 +23962,8 @@ const {
23944
23962
  }
23945
23963
  }, childMenuContent), h('div', {
23946
23964
  class: ['vxe-context-menu--link-suffix', childSuffixOpts.className || '']
23947
- }, [h('i', {
23948
- class: childSuffixOpts.icon
23965
+ }, [childSuffixIcon && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(childSuffixIcon) ? h('span', {}, getSlotVNs(childSuffixIcon.call($xeTable, {}))) : h('i', {
23966
+ class: childSuffixIcon
23949
23967
  }), childSuffixOpts.content ? h('span', `${childSuffixOpts.content}`) : menu_panel_renderEmptyElement($xeTable)])])]);
23950
23968
  })) : null]);
23951
23969
  }));
@@ -24030,8 +24048,11 @@ const {
24030
24048
  */
24031
24049
  triggerFilterEvent(evnt, column, params) {
24032
24050
  const $xeTable = this;
24051
+ const $xeGrid = $xeTable.$xeGrid;
24052
+ const $xeGantt = $xeTable.$xeGantt;
24033
24053
  const reactData = $xeTable;
24034
24054
  const internalData = $xeTable;
24055
+ const $xeGGWrapper = $xeGrid || $xeGantt;
24035
24056
  const {
24036
24057
  filterStore
24037
24058
  } = this;
@@ -24048,7 +24069,7 @@ const {
24048
24069
  if (filterStore.column === column && filterStore.visible) {
24049
24070
  filterStore.visible = false;
24050
24071
  } else {
24051
- const el = $xeTable.$refs.refElem;
24072
+ const tableEl = $xeTable.$refs.refElem;
24052
24073
  const {
24053
24074
  scrollTop,
24054
24075
  scrollLeft,
@@ -24059,8 +24080,10 @@ const {
24059
24080
  const {
24060
24081
  transfer
24061
24082
  } = filterOpts;
24062
- const tableRect = el.getBoundingClientRect();
24083
+ const tableRect = tableEl.getBoundingClientRect();
24063
24084
  const btnElem = evnt.currentTarget;
24085
+ const filterRender = column ? column.filterRender : null;
24086
+ const compConf = filterRender && isEnableConf(filterRender) ? mixin_renderer.get(filterRender.name) : null;
24064
24087
  $xeTable.handleFilterOptions(column);
24065
24088
  internalData._currFilterParams = params;
24066
24089
  filterStore.style = null;
@@ -24096,17 +24119,28 @@ const {
24096
24119
  } else {
24097
24120
  left = btnRect.left - tableRect.left - centerWidth;
24098
24121
  top = btnRect.top - tableRect.top + btnElem.clientHeight;
24099
- maxHeight = Math.max(40, el.clientHeight - top - (filterHeadElem ? filterHeadElem.clientHeight : 0) - (filterFootElem ? filterFootElem.clientHeight : 0) - 14);
24122
+ maxHeight = Math.max(40, tableEl.clientHeight - top - (filterHeadElem ? filterHeadElem.clientHeight : 0) - (filterFootElem ? filterFootElem.clientHeight : 0) - 14);
24100
24123
  if (left < 1) {
24101
24124
  left = 1;
24102
- } else if (left > el.clientWidth - filterWidth - 1) {
24103
- left = el.clientWidth - filterWidth - 1;
24125
+ } else if (left > tableEl.clientWidth - filterWidth - 1) {
24126
+ left = tableEl.clientWidth - filterWidth - 1;
24127
+ }
24128
+ if ($xeGGWrapper) {
24129
+ const wrapperEl = $xeGGWrapper.$refs.refElem;
24130
+ if (wrapperEl) {
24131
+ const wrapperRect = wrapperEl.getBoundingClientRect();
24132
+ top += tableRect.top - wrapperRect.top;
24133
+ }
24104
24134
  }
24105
24135
  }
24106
24136
  filterStore.style = {
24107
24137
  top: toCssUnit(top),
24108
24138
  left: toCssUnit(left)
24109
24139
  };
24140
+ // 筛选面板是自适应表格高度
24141
+ if (compConf ? !compConf.tableFilterAutoHeight : false) {
24142
+ maxHeight = 0;
24143
+ }
24110
24144
  // 判断面板不能大于表格高度
24111
24145
  filterStore.maxHeight = maxHeight;
24112
24146
  });
@@ -31550,7 +31584,7 @@ function renderBody(h, $xeTable) {
31550
31584
  }
31551
31585
  }
31552
31586
  if ($xeGGWrapper) {
31553
- const popupContainerElem = $xeGantt.$refs.refPopupContainerElem;
31587
+ const popupContainerElem = $xeGGWrapper.$refs.refPopupContainerElem;
31554
31588
  const popupWrapperEl = $xeTable.$refs.refPopupWrapperElem;
31555
31589
  if (popupContainerElem) {
31556
31590
  if (popupWrapperEl) {