vxe-table 3.18.17 → 3.18.19
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.
- package/es/style.css +1 -1
- package/es/table/module/filter/mixin.js +21 -5
- package/es/table/module/filter/panel.js +6 -5
- package/es/table/module/menu/panel.js +27 -13
- package/es/table/src/cell.js +10 -7
- package/es/table/src/methods.js +13 -17
- package/es/table/src/table.js +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/helper/vetur/attributes.json +1 -1
- package/helper/vetur/tags.json +1 -1
- package/lib/index.umd.js +67 -39
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/filter/mixin.js +21 -5
- package/lib/table/module/filter/mixin.min.js +1 -1
- package/lib/table/module/filter/panel.js +5 -4
- package/lib/table/module/filter/panel.min.js +1 -1
- package/lib/table/module/menu/panel.js +16 -9
- package/lib/table/module/menu/panel.min.js +1 -1
- package/lib/table/src/cell.js +9 -4
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +13 -13
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +1 -1
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/table/module/filter/mixin.ts +21 -5
- package/packages/table/module/filter/panel.ts +6 -5
- package/packages/table/module/menu/panel.ts +35 -21
- package/packages/table/src/cell.ts +10 -7
- package/packages/table/src/methods.ts +13 -13
- package/packages/table/src/table.ts +1 -1
- /package/es/{iconfont.1758506941442.ttf → iconfont.1758609487377.ttf} +0 -0
- /package/es/{iconfont.1758506941442.woff → iconfont.1758609487377.woff} +0 -0
- /package/es/{iconfont.1758506941442.woff2 → iconfont.1758609487377.woff2} +0 -0
- /package/lib/{iconfont.1758506941442.ttf → iconfont.1758609487377.ttf} +0 -0
- /package/lib/{iconfont.1758506941442.woff → iconfont.1758609487377.woff} +0 -0
- /package/lib/{iconfont.1758506941442.woff2 → iconfont.1758609487377.woff2} +0 -0
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.
|
|
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 ?
|
|
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.
|
|
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
|
|
@@ -5126,14 +5126,19 @@ const Cell = {
|
|
|
5126
5126
|
}
|
|
5127
5127
|
let editIconVNs = [];
|
|
5128
5128
|
if (isEnableConf(editConfig)) {
|
|
5129
|
-
|
|
5129
|
+
const {
|
|
5130
|
+
showAsterisk,
|
|
5131
|
+
showIcon,
|
|
5132
|
+
icon
|
|
5133
|
+
} = editOpts;
|
|
5134
|
+
editIconVNs = [isRequired && showAsterisk ? h('i', {
|
|
5130
5135
|
class: 'vxe-cell--required-icon'
|
|
5131
5136
|
}, [h('i', {
|
|
5132
5137
|
class: 'vxe-cell--required-icon'
|
|
5133
|
-
})]) : renderEmptyElement($table), isEnableConf(editRender) &&
|
|
5138
|
+
})]) : renderEmptyElement($table), isEnableConf(editRender) && showIcon ? h('i', {
|
|
5134
5139
|
class: 'vxe-cell--edit-icon'
|
|
5135
|
-
}, [h('i', {
|
|
5136
|
-
class:
|
|
5140
|
+
}, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(icon) ? getSlotVNs(icon({})) : [h('i', {
|
|
5141
|
+
class: icon || cell_getIcon().TABLE_EDIT
|
|
5137
5142
|
})]) : renderEmptyElement($table)];
|
|
5138
5143
|
}
|
|
5139
5144
|
return renderHeaderCellBaseVNs(h, params, editIconVNs.concat(Cell.renderHeaderTitle(h, params)).concat(sortable ? Cell.renderSortIcon(h, params) : []).concat(filters ? Cell.renderFilterIcon(h, params) : []));
|
|
@@ -19470,19 +19475,19 @@ const Methods = {
|
|
|
19470
19475
|
const funcs = 'setFilter,openFilter,clearFilter,saveFilterPanel,saveFilterPanelByEvent,resetFilterPanel,resetFilterPanelByEvent,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,insertChild,insertChildAt,insertChildNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getEditCell,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,fullValidateField,validateField,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,getCustomVisible,openCustom,closeCustom,toggleCustom,saveCustom,cancelCustom,resetCustom,toggleCustomAllCheckbox,setCustomAllCheckbox'.split(',');
|
|
19471
19476
|
funcs.forEach(name => {
|
|
19472
19477
|
Methods[name] = function (...args) {
|
|
19473
|
-
if (!this[`_${name}`]) {
|
|
19474
|
-
|
|
19475
|
-
|
|
19476
|
-
|
|
19477
|
-
|
|
19478
|
-
|
|
19479
|
-
|
|
19480
|
-
|
|
19481
|
-
|
|
19482
|
-
|
|
19483
|
-
|
|
19484
|
-
|
|
19485
|
-
}
|
|
19478
|
+
// if (!this[`_${name}`]) {
|
|
19479
|
+
// if ('openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',').includes(name)) {
|
|
19480
|
+
// errLog('vxe.error.reqModule', ['Export'])
|
|
19481
|
+
// } else if ('fullValidate,validate'.split(',').includes(name)) {
|
|
19482
|
+
// errLog('vxe.error.reqModule', ['Validator'])
|
|
19483
|
+
// } else if ('setFilter,openFilter,clearFilter,getCheckedFilters'.split(',').includes(name)) {
|
|
19484
|
+
// errLog('vxe.error.reqModule', ['Filter'])
|
|
19485
|
+
// } else if ('insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,getEditRecord,getEditCell,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell'.split(',').includes(name)) {
|
|
19486
|
+
// errLog('vxe.error.reqModule', ['Edit'])
|
|
19487
|
+
// } else if ('openCustom'.split(',').includes(name)) {
|
|
19488
|
+
// errLog('vxe.error.reqModule', ['Custom'])
|
|
19489
|
+
// }
|
|
19490
|
+
// }
|
|
19486
19491
|
return this[`_${name}`] ? this[`_${name}`](...args) : null;
|
|
19487
19492
|
};
|
|
19488
19493
|
});
|
|
@@ -22790,6 +22795,7 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
22790
22795
|
|
|
22791
22796
|
|
|
22792
22797
|
|
|
22798
|
+
|
|
22793
22799
|
const {
|
|
22794
22800
|
getI18n: filter_panel_getI18n,
|
|
22795
22801
|
getIcon: filter_panel_getIcon,
|
|
@@ -22819,14 +22825,14 @@ function renderOptions($xeFilterPanel, h, filterRender, compConf) {
|
|
|
22819
22825
|
return [h('div', {
|
|
22820
22826
|
class: 'vxe-table--filter-template',
|
|
22821
22827
|
style: maxHeight ? {
|
|
22822
|
-
maxHeight:
|
|
22828
|
+
maxHeight: toCssUnit(maxHeight)
|
|
22823
22829
|
} : {}
|
|
22824
22830
|
}, $xeTable.callSlot(filterSlot, params, h))];
|
|
22825
22831
|
} else if (rtFilter) {
|
|
22826
22832
|
return [h('div', {
|
|
22827
22833
|
class: 'vxe-table--filter-template',
|
|
22828
22834
|
style: maxHeight ? {
|
|
22829
|
-
maxHeight:
|
|
22835
|
+
maxHeight: toCssUnit(maxHeight)
|
|
22830
22836
|
} : {}
|
|
22831
22837
|
}, getSlotVNs(rtFilter.call($xeTable, h, filterRender, params)))];
|
|
22832
22838
|
}
|
|
@@ -22854,7 +22860,7 @@ function renderOptions($xeFilterPanel, h, filterRender, compConf) {
|
|
|
22854
22860
|
}, filter_panel_getI18n('vxe.table.allFilter'))]))]), h('ul', {
|
|
22855
22861
|
class: 'vxe-table--filter-body',
|
|
22856
22862
|
style: maxHeight ? {
|
|
22857
|
-
maxHeight:
|
|
22863
|
+
maxHeight: toCssUnit(maxHeight)
|
|
22858
22864
|
} : {}
|
|
22859
22865
|
}, filterStore.options.map(item => {
|
|
22860
22866
|
const isChecked = item._checked;
|
|
@@ -22977,7 +22983,7 @@ function renderFooter($xeFilterPanel, h) {
|
|
|
22977
22983
|
} = filterOpts;
|
|
22978
22984
|
return h('div', {
|
|
22979
22985
|
ref: 'refElem',
|
|
22980
|
-
class: ['vxe-table--filter-wrapper', 'filter--prevent-default', className, compConf && compConf.className ? compConf.className : '',
|
|
22986
|
+
class: ['vxe-table--filter-wrapper', 'filter--prevent-default', className, compConf && compConf.className ? compConf.className : '', getPropClass(filterClassName, params), {
|
|
22981
22987
|
[`size--${vSize}`]: vSize,
|
|
22982
22988
|
'is--animat': tableProps.animat,
|
|
22983
22989
|
'is--multiple': multiple,
|
|
@@ -23810,6 +23816,8 @@ const {
|
|
|
23810
23816
|
;// CONCATENATED MODULE: ./packages/table/module/menu/panel.ts
|
|
23811
23817
|
|
|
23812
23818
|
|
|
23819
|
+
|
|
23820
|
+
|
|
23813
23821
|
const {
|
|
23814
23822
|
getIcon: menu_panel_getIcon,
|
|
23815
23823
|
renderEmptyElement: menu_panel_renderEmptyElement
|
|
@@ -23872,7 +23880,9 @@ const {
|
|
|
23872
23880
|
}, options.map((item, index) => {
|
|
23873
23881
|
const hasChildMenus = item.children && item.children.some(child => child.visible !== false);
|
|
23874
23882
|
const prefixOpts = Object.assign({}, item.prefixConfig);
|
|
23883
|
+
const prefixIcon = prefixOpts.icon || item.prefixIcon;
|
|
23875
23884
|
const suffixOpts = Object.assign({}, item.suffixConfig);
|
|
23885
|
+
const suffixIcon = suffixOpts.icon || item.suffixIcon;
|
|
23876
23886
|
const menuContent = getFuncText(item.name);
|
|
23877
23887
|
return item.visible === false ? menu_panel_renderEmptyElement($xeTable) : h('li', {
|
|
23878
23888
|
class: [item.className, {
|
|
@@ -23895,8 +23905,8 @@ const {
|
|
|
23895
23905
|
}
|
|
23896
23906
|
}, [h('div', {
|
|
23897
23907
|
class: ['vxe-context-menu--link-prefix', prefixOpts.className || '']
|
|
23898
|
-
}, [h('i', {
|
|
23899
|
-
class:
|
|
23908
|
+
}, [prefixIcon && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(prefixIcon) ? h('span', {}, getSlotVNs(prefixIcon.call($xeTable, {}))) : h('i', {
|
|
23909
|
+
class: prefixIcon
|
|
23900
23910
|
}), prefixOpts.content ? h('span', {}, `${prefixOpts.content}`) : menu_panel_renderEmptyElement($xeTable)]), h('span', {
|
|
23901
23911
|
class: 'vxe-context-menu--link-content',
|
|
23902
23912
|
attrs: {
|
|
@@ -23904,15 +23914,17 @@ const {
|
|
|
23904
23914
|
}
|
|
23905
23915
|
}, menuContent), h('div', {
|
|
23906
23916
|
class: ['vxe-context-menu--link-suffix', suffixOpts.className || '']
|
|
23907
|
-
}, [h('i', {
|
|
23908
|
-
class:
|
|
23909
|
-
}), suffixOpts.content ? h('span', `${suffixOpts.content}`) : menu_panel_renderEmptyElement($xeTable)])]), hasChildMenus ? h('ul', {
|
|
23917
|
+
}, [suffixIcon && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(suffixIcon) ? h('span', {}, getSlotVNs(suffixIcon.call($xeTable, {}))) : h('i', {
|
|
23918
|
+
class: suffixIcon || (hasChildMenus ? menu_panel_getIcon().TABLE_MENU_OPTIONS : '')
|
|
23919
|
+
}), suffixOpts.content ? h('span', `${suffixOpts.content}`) : menu_panel_renderEmptyElement($xeTable)])]), hasChildMenus && item.children ? h('ul', {
|
|
23910
23920
|
class: ['vxe-table--context-menu-clild-wrapper', {
|
|
23911
23921
|
'is--show': item === ctxMenuStore.selected && ctxMenuStore.showChild
|
|
23912
23922
|
}]
|
|
23913
23923
|
}, item.children.map((child, cIndex) => {
|
|
23914
23924
|
const childPrefixOpts = Object.assign({}, child.prefixConfig);
|
|
23925
|
+
const childPrefixIcon = childPrefixOpts.icon || child.prefixIcon;
|
|
23915
23926
|
const childSuffixOpts = Object.assign({}, child.suffixConfig);
|
|
23927
|
+
const childSuffixIcon = childSuffixOpts.icon || child.suffixIcon;
|
|
23916
23928
|
const childMenuContent = getFuncText(child.name);
|
|
23917
23929
|
return child.visible === false ? null : h('li', {
|
|
23918
23930
|
class: [child.className, {
|
|
@@ -23935,8 +23947,8 @@ const {
|
|
|
23935
23947
|
}
|
|
23936
23948
|
}, [h('div', {
|
|
23937
23949
|
class: ['vxe-context-menu--link-prefix', childPrefixOpts.className || '']
|
|
23938
|
-
}, [h('i', {
|
|
23939
|
-
class:
|
|
23950
|
+
}, [childPrefixIcon && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(childPrefixIcon) ? h('span', {}, getSlotVNs(childPrefixIcon.call($xeTable, {}))) : h('i', {
|
|
23951
|
+
class: childPrefixIcon
|
|
23940
23952
|
}), childPrefixOpts.content ? h('span', `${childPrefixOpts.content}`) : menu_panel_renderEmptyElement($xeTable)]), h('span', {
|
|
23941
23953
|
class: 'vxe-context-menu--link-content',
|
|
23942
23954
|
attrs: {
|
|
@@ -23944,8 +23956,8 @@ const {
|
|
|
23944
23956
|
}
|
|
23945
23957
|
}, childMenuContent), h('div', {
|
|
23946
23958
|
class: ['vxe-context-menu--link-suffix', childSuffixOpts.className || '']
|
|
23947
|
-
}, [h('i', {
|
|
23948
|
-
class:
|
|
23959
|
+
}, [childSuffixIcon && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(childSuffixIcon) ? h('span', {}, getSlotVNs(childSuffixIcon.call($xeTable, {}))) : h('i', {
|
|
23960
|
+
class: childSuffixIcon
|
|
23949
23961
|
}), childSuffixOpts.content ? h('span', `${childSuffixOpts.content}`) : menu_panel_renderEmptyElement($xeTable)])])]);
|
|
23950
23962
|
})) : null]);
|
|
23951
23963
|
}));
|
|
@@ -24030,8 +24042,11 @@ const {
|
|
|
24030
24042
|
*/
|
|
24031
24043
|
triggerFilterEvent(evnt, column, params) {
|
|
24032
24044
|
const $xeTable = this;
|
|
24045
|
+
const $xeGrid = $xeTable.$xeGrid;
|
|
24046
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
24033
24047
|
const reactData = $xeTable;
|
|
24034
24048
|
const internalData = $xeTable;
|
|
24049
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
24035
24050
|
const {
|
|
24036
24051
|
filterStore
|
|
24037
24052
|
} = this;
|
|
@@ -24048,7 +24063,7 @@ const {
|
|
|
24048
24063
|
if (filterStore.column === column && filterStore.visible) {
|
|
24049
24064
|
filterStore.visible = false;
|
|
24050
24065
|
} else {
|
|
24051
|
-
const
|
|
24066
|
+
const tableEl = $xeTable.$refs.refElem;
|
|
24052
24067
|
const {
|
|
24053
24068
|
scrollTop,
|
|
24054
24069
|
scrollLeft,
|
|
@@ -24059,8 +24074,10 @@ const {
|
|
|
24059
24074
|
const {
|
|
24060
24075
|
transfer
|
|
24061
24076
|
} = filterOpts;
|
|
24062
|
-
const tableRect =
|
|
24077
|
+
const tableRect = tableEl.getBoundingClientRect();
|
|
24063
24078
|
const btnElem = evnt.currentTarget;
|
|
24079
|
+
const filterRender = column ? column.filterRender : null;
|
|
24080
|
+
const compConf = filterRender && isEnableConf(filterRender) ? mixin_renderer.get(filterRender.name) : null;
|
|
24064
24081
|
$xeTable.handleFilterOptions(column);
|
|
24065
24082
|
internalData._currFilterParams = params;
|
|
24066
24083
|
filterStore.style = null;
|
|
@@ -24096,17 +24113,28 @@ const {
|
|
|
24096
24113
|
} else {
|
|
24097
24114
|
left = btnRect.left - tableRect.left - centerWidth;
|
|
24098
24115
|
top = btnRect.top - tableRect.top + btnElem.clientHeight;
|
|
24099
|
-
maxHeight = Math.max(40,
|
|
24116
|
+
maxHeight = Math.max(40, tableEl.clientHeight - top - (filterHeadElem ? filterHeadElem.clientHeight : 0) - (filterFootElem ? filterFootElem.clientHeight : 0) - 14);
|
|
24100
24117
|
if (left < 1) {
|
|
24101
24118
|
left = 1;
|
|
24102
|
-
} else if (left >
|
|
24103
|
-
left =
|
|
24119
|
+
} else if (left > tableEl.clientWidth - filterWidth - 1) {
|
|
24120
|
+
left = tableEl.clientWidth - filterWidth - 1;
|
|
24121
|
+
}
|
|
24122
|
+
if ($xeGGWrapper) {
|
|
24123
|
+
const wrapperEl = $xeGGWrapper.$refs.refElem;
|
|
24124
|
+
if (wrapperEl) {
|
|
24125
|
+
const wrapperRect = wrapperEl.getBoundingClientRect();
|
|
24126
|
+
top += tableRect.top - wrapperRect.top;
|
|
24127
|
+
}
|
|
24104
24128
|
}
|
|
24105
24129
|
}
|
|
24106
24130
|
filterStore.style = {
|
|
24107
24131
|
top: toCssUnit(top),
|
|
24108
24132
|
left: toCssUnit(left)
|
|
24109
24133
|
};
|
|
24134
|
+
// 筛选面板是自适应表格高度
|
|
24135
|
+
if (compConf ? !compConf.tableFilterAutoHeight : false) {
|
|
24136
|
+
maxHeight = 0;
|
|
24137
|
+
}
|
|
24110
24138
|
// 判断面板不能大于表格高度
|
|
24111
24139
|
filterStore.maxHeight = maxHeight;
|
|
24112
24140
|
});
|
|
@@ -31550,7 +31578,7 @@ function renderBody(h, $xeTable) {
|
|
|
31550
31578
|
}
|
|
31551
31579
|
}
|
|
31552
31580
|
if ($xeGGWrapper) {
|
|
31553
|
-
const popupContainerElem = $
|
|
31581
|
+
const popupContainerElem = $xeGGWrapper.$refs.refPopupContainerElem;
|
|
31554
31582
|
const popupWrapperEl = $xeTable.$refs.refPopupWrapperElem;
|
|
31555
31583
|
if (popupContainerElem) {
|
|
31556
31584
|
if (popupWrapperEl) {
|