vxe-table 4.8.4 → 4.8.6
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/README.md +12 -12
- package/es/grid/src/grid.js +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/hook.js +135 -3
- package/es/table/module/custom/panel.js +179 -181
- package/es/table/module/validator/hook.js +1 -1
- package/es/table/src/body.js +14 -8
- package/es/table/src/table.js +77 -73
- package/es/table/style.css +67 -52
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +3 -2
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +67 -52
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +1 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +374 -247
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/hook.js +177 -3
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +108 -162
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/validator/hook.js +1 -1
- package/lib/table/module/validator/hook.min.js +1 -1
- package/lib/table/src/body.js +5 -3
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/table.js +78 -74
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +67 -52
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +3 -2
- 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/lib/vxe-table/style/style.css +67 -52
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +1 -1
- package/packages/table/module/custom/hook.ts +136 -3
- package/packages/table/module/custom/panel.ts +186 -185
- package/packages/table/module/validator/hook.ts +1 -1
- package/packages/table/src/body.ts +14 -8
- package/packages/table/src/table.ts +77 -73
- package/packages/ui/index.ts +2 -1
- package/styles/components/table-module/custom.scss +23 -6
- package/styles/components/table.scss +36 -26
- /package/es/{iconfont.1730946045701.ttf → iconfont.1731028500961.ttf} +0 -0
- /package/es/{iconfont.1730946045701.woff → iconfont.1731028500961.woff} +0 -0
- /package/es/{iconfont.1730946045701.woff2 → iconfont.1731028500961.woff2} +0 -0
- /package/lib/{iconfont.1730946045701.ttf → iconfont.1731028500961.ttf} +0 -0
- /package/lib/{iconfont.1730946045701.woff → iconfont.1731028500961.woff} +0 -0
- /package/lib/{iconfont.1730946045701.woff2 → iconfont.1731028500961.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -1998,7 +1998,7 @@ function eqEmptyValue(cellValue) {
|
|
|
1998
1998
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
1999
1999
|
|
|
2000
2000
|
|
|
2001
|
-
const version = "4.8.
|
|
2001
|
+
const version = "4.8.6";
|
|
2002
2002
|
core_.VxeUI.version = version;
|
|
2003
2003
|
core_.VxeUI.tableVersion = version;
|
|
2004
2004
|
core_.VxeUI.setConfig({
|
|
@@ -2050,7 +2050,8 @@ core_.VxeUI.setConfig({
|
|
|
2050
2050
|
autoClear: true,
|
|
2051
2051
|
autoPos: true,
|
|
2052
2052
|
message: 'inline',
|
|
2053
|
-
msgMode: 'single'
|
|
2053
|
+
msgMode: 'single',
|
|
2054
|
+
theme: 'normal'
|
|
2054
2055
|
},
|
|
2055
2056
|
columnConfig: {
|
|
2056
2057
|
maxFixedSize: 4
|
|
@@ -2388,7 +2389,7 @@ var es_array_push = __webpack_require__(4114);
|
|
|
2388
2389
|
const {
|
|
2389
2390
|
log: log_log
|
|
2390
2391
|
} = core_.VxeUI;
|
|
2391
|
-
const log_version = `table v${"4.8.
|
|
2392
|
+
const log_version = `table v${"4.8.6"}`;
|
|
2392
2393
|
const warnLog = log_log.create('warn', log_version);
|
|
2393
2394
|
const errLog = log_log.create('error', log_version);
|
|
2394
2395
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -5107,13 +5108,15 @@ const lineOffsetSizes = {
|
|
|
5107
5108
|
...errorValidItem
|
|
5108
5109
|
};
|
|
5109
5110
|
tdVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
5110
|
-
class: ['vxe-cell--valid-error-
|
|
5111
|
+
class: ['vxe-cell--valid-error-tip', getPropClass(validOpts.className, validParams)],
|
|
5111
5112
|
style: errRule && errRule.maxWidth ? {
|
|
5112
5113
|
width: `${errRule.maxWidth}px`
|
|
5113
5114
|
} : null
|
|
5114
|
-
},
|
|
5115
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
5116
|
+
class: `vxe-cell--valid-error-wrapper vxe-cell--valid-error-theme-${validOpts.theme || 'normal'}`
|
|
5117
|
+
}, [validSlot ? $xeTable.callSlot(validSlot, validParams) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
5115
5118
|
class: 'vxe-cell--valid-error-msg'
|
|
5116
|
-
}, errorValidItem.content)]));
|
|
5119
|
+
}, errorValidItem.content)]])]));
|
|
5117
5120
|
}
|
|
5118
5121
|
}
|
|
5119
5122
|
let cellHeight = '';
|
|
@@ -6705,7 +6708,8 @@ const {
|
|
|
6705
6708
|
|
|
6706
6709
|
const {
|
|
6707
6710
|
getI18n: panel_getI18n,
|
|
6708
|
-
getIcon: panel_getIcon
|
|
6711
|
+
getIcon: panel_getIcon,
|
|
6712
|
+
renderEmptyElement: panel_renderEmptyElement
|
|
6709
6713
|
} = core_.VxeUI;
|
|
6710
6714
|
/* harmony default export */ var panel = ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
|
|
6711
6715
|
name: 'TableCustomPanel',
|
|
@@ -6719,7 +6723,7 @@ const {
|
|
|
6719
6723
|
const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
|
|
6720
6724
|
const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
|
|
6721
6725
|
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
6722
|
-
const
|
|
6726
|
+
const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeNumberInput');
|
|
6723
6727
|
const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
|
|
6724
6728
|
const VxeUIRadioGroupComponent = core_.VxeUI.getComponent('VxeRadioGroup');
|
|
6725
6729
|
const $xeTable = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeTable', {});
|
|
@@ -6729,7 +6733,8 @@ const {
|
|
|
6729
6733
|
const {
|
|
6730
6734
|
computeCustomOpts,
|
|
6731
6735
|
computeColumnOpts,
|
|
6732
|
-
computeIsMaxFixedColumn
|
|
6736
|
+
computeIsMaxFixedColumn,
|
|
6737
|
+
computeResizableOpts
|
|
6733
6738
|
} = $xeTable.getComputeMaps();
|
|
6734
6739
|
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
6735
6740
|
const bodyElemRef = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
@@ -6757,44 +6762,9 @@ const {
|
|
|
6757
6762
|
const confirmCustomEvent = ({
|
|
6758
6763
|
$event
|
|
6759
6764
|
}) => {
|
|
6760
|
-
|
|
6761
|
-
customColumnList
|
|
6762
|
-
} = reactData;
|
|
6763
|
-
const customOpts = computeCustomOpts.value;
|
|
6764
|
-
const {
|
|
6765
|
-
allowVisible,
|
|
6766
|
-
allowSort,
|
|
6767
|
-
allowFixed,
|
|
6768
|
-
allowResizable
|
|
6769
|
-
} = customOpts;
|
|
6770
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
6771
|
-
if (parent) {
|
|
6772
|
-
// 更新子列信息
|
|
6773
|
-
column.fixed = parent.fixed;
|
|
6774
|
-
} else {
|
|
6775
|
-
if (allowSort) {
|
|
6776
|
-
const sortIndex = index + 1;
|
|
6777
|
-
column.renderSortNumber = sortIndex;
|
|
6778
|
-
}
|
|
6779
|
-
if (allowFixed) {
|
|
6780
|
-
column.fixed = column.renderFixed;
|
|
6781
|
-
}
|
|
6782
|
-
}
|
|
6783
|
-
if (allowResizable) {
|
|
6784
|
-
if (column.renderVisible && (!column.children || column.children.length)) {
|
|
6785
|
-
if (column.renderResizeWidth !== column.renderWidth) {
|
|
6786
|
-
column.resizeWidth = column.renderResizeWidth;
|
|
6787
|
-
column.renderWidth = column.renderResizeWidth;
|
|
6788
|
-
}
|
|
6789
|
-
}
|
|
6790
|
-
}
|
|
6791
|
-
if (allowVisible) {
|
|
6792
|
-
column.visible = column.renderVisible;
|
|
6793
|
-
}
|
|
6794
|
-
});
|
|
6765
|
+
$xeTable.saveCustom();
|
|
6795
6766
|
$xeTable.closeCustom();
|
|
6796
6767
|
$xeTable.emitCustomEvent('confirm', $event);
|
|
6797
|
-
$xeTable.saveCustomStore('confirm');
|
|
6798
6768
|
};
|
|
6799
6769
|
const cancelCloseEvent = ({
|
|
6800
6770
|
$event
|
|
@@ -6805,50 +6775,12 @@ const {
|
|
|
6805
6775
|
const cancelCustomEvent = ({
|
|
6806
6776
|
$event
|
|
6807
6777
|
}) => {
|
|
6808
|
-
|
|
6809
|
-
customStore
|
|
6810
|
-
} = props;
|
|
6811
|
-
const {
|
|
6812
|
-
customColumnList
|
|
6813
|
-
} = reactData;
|
|
6814
|
-
const {
|
|
6815
|
-
oldSortMaps,
|
|
6816
|
-
oldFixedMaps,
|
|
6817
|
-
oldVisibleMaps
|
|
6818
|
-
} = customStore;
|
|
6819
|
-
const customOpts = computeCustomOpts.value;
|
|
6820
|
-
const {
|
|
6821
|
-
allowVisible,
|
|
6822
|
-
allowSort,
|
|
6823
|
-
allowFixed,
|
|
6824
|
-
allowResizable
|
|
6825
|
-
} = customOpts;
|
|
6826
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
6827
|
-
const colid = column.getKey();
|
|
6828
|
-
const visible = !!oldVisibleMaps[colid];
|
|
6829
|
-
const fixed = oldFixedMaps[colid] || '';
|
|
6830
|
-
if (allowVisible) {
|
|
6831
|
-
column.renderVisible = visible;
|
|
6832
|
-
column.visible = visible;
|
|
6833
|
-
}
|
|
6834
|
-
if (allowFixed) {
|
|
6835
|
-
column.renderFixed = fixed;
|
|
6836
|
-
column.fixed = fixed;
|
|
6837
|
-
}
|
|
6838
|
-
if (allowSort) {
|
|
6839
|
-
column.renderSortNumber = oldSortMaps[colid] || 0;
|
|
6840
|
-
}
|
|
6841
|
-
if (allowResizable) {
|
|
6842
|
-
column.renderResizeWidth = column.renderWidth;
|
|
6843
|
-
}
|
|
6844
|
-
}, {
|
|
6845
|
-
children: 'children'
|
|
6846
|
-
});
|
|
6778
|
+
$xeTable.cancelCustom();
|
|
6847
6779
|
$xeTable.closeCustom();
|
|
6848
6780
|
$xeTable.emitCustomEvent('cancel', $event);
|
|
6849
6781
|
};
|
|
6850
6782
|
const handleResetCustomEvent = evnt => {
|
|
6851
|
-
$xeTable.
|
|
6783
|
+
$xeTable.resetCustom(true);
|
|
6852
6784
|
$xeTable.closeCustom();
|
|
6853
6785
|
$xeTable.emitCustomEvent('reset', evnt);
|
|
6854
6786
|
};
|
|
@@ -6939,55 +6871,7 @@ const {
|
|
|
6939
6871
|
}
|
|
6940
6872
|
};
|
|
6941
6873
|
const allOptionEvent = () => {
|
|
6942
|
-
|
|
6943
|
-
customStore
|
|
6944
|
-
} = props;
|
|
6945
|
-
const {
|
|
6946
|
-
customColumnList
|
|
6947
|
-
} = reactData;
|
|
6948
|
-
const customOpts = computeCustomOpts.value;
|
|
6949
|
-
const {
|
|
6950
|
-
checkMethod,
|
|
6951
|
-
visibleMethod
|
|
6952
|
-
} = customOpts;
|
|
6953
|
-
const isAll = !customStore.isAll;
|
|
6954
|
-
if (customOpts.immediate) {
|
|
6955
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
6956
|
-
if (visibleMethod && !visibleMethod({
|
|
6957
|
-
column
|
|
6958
|
-
})) {
|
|
6959
|
-
return;
|
|
6960
|
-
}
|
|
6961
|
-
if (checkMethod && !checkMethod({
|
|
6962
|
-
column
|
|
6963
|
-
})) {
|
|
6964
|
-
return;
|
|
6965
|
-
}
|
|
6966
|
-
column.visible = isAll;
|
|
6967
|
-
column.renderVisible = isAll;
|
|
6968
|
-
column.halfVisible = false;
|
|
6969
|
-
});
|
|
6970
|
-
customStore.isAll = isAll;
|
|
6971
|
-
$xeTable.handleCustom();
|
|
6972
|
-
$xeTable.saveCustomStore('update:visible');
|
|
6973
|
-
} else {
|
|
6974
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
6975
|
-
if (visibleMethod && !visibleMethod({
|
|
6976
|
-
column
|
|
6977
|
-
})) {
|
|
6978
|
-
return;
|
|
6979
|
-
}
|
|
6980
|
-
if (checkMethod && !checkMethod({
|
|
6981
|
-
column
|
|
6982
|
-
})) {
|
|
6983
|
-
return;
|
|
6984
|
-
}
|
|
6985
|
-
column.renderVisible = isAll;
|
|
6986
|
-
column.halfVisible = false;
|
|
6987
|
-
});
|
|
6988
|
-
customStore.isAll = isAll;
|
|
6989
|
-
}
|
|
6990
|
-
$xeTable.checkCustomStatus();
|
|
6874
|
+
$xeTable.toggleCustomAllCheckbox();
|
|
6991
6875
|
};
|
|
6992
6876
|
const sortMousedownEvent = evnt => {
|
|
6993
6877
|
const btnEl = evnt.currentTarget;
|
|
@@ -6998,6 +6882,7 @@ const {
|
|
|
6998
6882
|
trEl.draggable = true;
|
|
6999
6883
|
dragColumnRef.value = column;
|
|
7000
6884
|
addClass(trEl, 'active--drag-origin');
|
|
6885
|
+
updateDropHint(evnt);
|
|
7001
6886
|
};
|
|
7002
6887
|
const sortMouseupEvent = evnt => {
|
|
7003
6888
|
const btnEl = evnt.currentTarget;
|
|
@@ -7121,13 +7006,29 @@ const {
|
|
|
7121
7006
|
placement
|
|
7122
7007
|
} = customOpts;
|
|
7123
7008
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value;
|
|
7009
|
+
const slots = customOpts.slots || {};
|
|
7010
|
+
const headerSlot = slots.header;
|
|
7011
|
+
const topSlot = slots.top;
|
|
7012
|
+
const bottomSlot = slots.bottom;
|
|
7013
|
+
const defaultSlot = slots.default;
|
|
7014
|
+
const footerSlot = slots.footer;
|
|
7124
7015
|
const colVNs = [];
|
|
7125
7016
|
const customWrapperOns = {};
|
|
7017
|
+
const isAllChecked = customStore.isAll;
|
|
7018
|
+
const isAllIndeterminate = customStore.isIndeterminate;
|
|
7019
|
+
const dragColumn = dragColumnRef.value;
|
|
7126
7020
|
// hover 触发
|
|
7127
7021
|
if (trigger === 'hover') {
|
|
7128
7022
|
customWrapperOns.onMouseenter = handleWrapperMouseenterEvent;
|
|
7129
7023
|
customWrapperOns.onMouseleave = handleWrapperMouseleaveEvent;
|
|
7130
7024
|
}
|
|
7025
|
+
const params = {
|
|
7026
|
+
$table: $xeTable,
|
|
7027
|
+
$grid: $xeTable.xegrid,
|
|
7028
|
+
columns: customColumnList,
|
|
7029
|
+
isAllChecked,
|
|
7030
|
+
isAllIndeterminate
|
|
7031
|
+
};
|
|
7131
7032
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
7132
7033
|
const isVisible = visibleMethod ? visibleMethod({
|
|
7133
7034
|
column
|
|
@@ -7208,9 +7109,6 @@ const {
|
|
|
7208
7109
|
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()]) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()]));
|
|
7209
7110
|
}
|
|
7210
7111
|
});
|
|
7211
|
-
const isAllChecked = customStore.isAll;
|
|
7212
|
-
const isAllIndeterminate = customStore.isIndeterminate;
|
|
7213
|
-
const dragColumn = dragColumnRef.value;
|
|
7214
7112
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7215
7113
|
ref: refElem,
|
|
7216
7114
|
key: 'simple',
|
|
@@ -7220,8 +7118,10 @@ const {
|
|
|
7220
7118
|
style: maxHeight && !['left', 'right'].includes(placement) ? {
|
|
7221
7119
|
maxHeight: `${maxHeight}px`
|
|
7222
7120
|
} : {}
|
|
7223
|
-
}, customStore.visible ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('
|
|
7121
|
+
}, customStore.visible ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7224
7122
|
class: 'vxe-table-custom--header'
|
|
7123
|
+
}, headerSlot ? $xeTable.callSlot(headerSlot, params) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('ul', {
|
|
7124
|
+
class: 'vxe-table-custom--panel-list'
|
|
7225
7125
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('li', {
|
|
7226
7126
|
class: 'vxe-table-custom--option'
|
|
7227
7127
|
}, [allowVisible ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
@@ -7237,21 +7137,29 @@ const {
|
|
|
7237
7137
|
class: 'vxe-checkbox--label'
|
|
7238
7138
|
}, panel_getI18n('vxe.toolbar.customAll'))]) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
7239
7139
|
class: 'vxe-checkbox--label'
|
|
7240
|
-
}, panel_getI18n('vxe.table.customTitle'))])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7140
|
+
}, panel_getI18n('vxe.table.customTitle'))])])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7241
7141
|
ref: bodyElemRef,
|
|
7242
|
-
class: 'vxe-table-custom--
|
|
7243
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(
|
|
7244
|
-
class: 'vxe-table-custom--
|
|
7142
|
+
class: 'vxe-table-custom--body'
|
|
7143
|
+
}, [topSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7144
|
+
class: 'vxe-table-custom--panel-top'
|
|
7145
|
+
}, $xeTable.callSlot(topSlot, params)) : panel_renderEmptyElement($xeTable), defaultSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7146
|
+
class: 'vxe-table-custom--panel-body'
|
|
7147
|
+
}, $xeTable.callSlot(defaultSlot, params)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(external_commonjs_vue_commonjs2_vue_root_Vue_.TransitionGroup, {
|
|
7148
|
+
class: 'vxe-table-custom--panel-list',
|
|
7245
7149
|
name: 'vxe-table-custom--list',
|
|
7246
7150
|
tag: 'ul',
|
|
7247
7151
|
...customWrapperOns
|
|
7248
7152
|
}, {
|
|
7249
7153
|
default: () => colVNs
|
|
7250
|
-
}), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7154
|
+
}), bottomSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7155
|
+
class: 'vxe-table-custom--panel-bottom'
|
|
7156
|
+
}, $xeTable.callSlot(bottomSlot, params)) : panel_renderEmptyElement($xeTable), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7251
7157
|
ref: dragHintElemRef,
|
|
7252
7158
|
class: 'vxe-table-custom-popup--drag-hint'
|
|
7253
7159
|
}, panel_getI18n('vxe.custom.cstmDragTarget', [dragColumn && dragColumn.type !== 'html' ? dragColumn.getTitle() : '']))]), customOpts.showFooter ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7254
7160
|
class: 'vxe-table-custom--footer'
|
|
7161
|
+
}, footerSlot ? $xeTable.callSlot(footerSlot, params) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7162
|
+
class: 'vxe-table-custom--footer-buttons'
|
|
7255
7163
|
}, [VxeUIButtonComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIButtonComponent, {
|
|
7256
7164
|
mode: 'text',
|
|
7257
7165
|
content: customOpts.resetButtonText || panel_getI18n('vxe.table.customRestore'),
|
|
@@ -7269,7 +7177,7 @@ const {
|
|
|
7269
7177
|
status: 'primary',
|
|
7270
7178
|
content: customOpts.confirmButtonText || panel_getI18n('vxe.table.customConfirm'),
|
|
7271
7179
|
onClick: confirmCustomEvent
|
|
7272
|
-
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()]) : null] : []);
|
|
7180
|
+
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()])]) : null] : []);
|
|
7273
7181
|
};
|
|
7274
7182
|
const renderPopupPanel = () => {
|
|
7275
7183
|
const {
|
|
@@ -7293,18 +7201,57 @@ const {
|
|
|
7293
7201
|
const {
|
|
7294
7202
|
maxFixedSize
|
|
7295
7203
|
} = columnOpts;
|
|
7204
|
+
const resizableOpts = computeResizableOpts.value;
|
|
7205
|
+
const {
|
|
7206
|
+
minWidth: reMinWidth,
|
|
7207
|
+
maxWidth: reMaxWidth
|
|
7208
|
+
} = resizableOpts;
|
|
7296
7209
|
const {
|
|
7297
7210
|
mode
|
|
7298
7211
|
} = customOpts;
|
|
7299
7212
|
const modalOpts = Object.assign({}, modalOptions);
|
|
7300
7213
|
const drawerOpts = Object.assign({}, drawerOptions);
|
|
7301
7214
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value;
|
|
7215
|
+
const slots = customOpts.slots || {};
|
|
7216
|
+
const headerSlot = slots.header;
|
|
7217
|
+
const topSlot = slots.top;
|
|
7218
|
+
const bottomSlot = slots.bottom;
|
|
7219
|
+
const defaultSlot = slots.default;
|
|
7220
|
+
const footerSlot = slots.footer;
|
|
7302
7221
|
const trVNs = [];
|
|
7222
|
+
const isAllChecked = customStore.isAll;
|
|
7223
|
+
const isAllIndeterminate = customStore.isIndeterminate;
|
|
7224
|
+
const dragColumn = dragColumnRef.value;
|
|
7225
|
+
const params = {
|
|
7226
|
+
$table: $xeTable,
|
|
7227
|
+
$grid: $xeTable.xegrid,
|
|
7228
|
+
columns: customColumnList,
|
|
7229
|
+
isAllChecked,
|
|
7230
|
+
isAllIndeterminate
|
|
7231
|
+
};
|
|
7303
7232
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
7304
7233
|
const isVisible = visibleMethod ? visibleMethod({
|
|
7305
7234
|
column
|
|
7306
7235
|
}) : true;
|
|
7307
7236
|
if (isVisible) {
|
|
7237
|
+
// 默认继承调整宽度
|
|
7238
|
+
let customMinWidth = 0;
|
|
7239
|
+
let customMaxWidth = 0;
|
|
7240
|
+
if (allowResizable) {
|
|
7241
|
+
const resizeParams = {
|
|
7242
|
+
$table: $xeTable,
|
|
7243
|
+
column,
|
|
7244
|
+
columnIndex: index,
|
|
7245
|
+
$columnIndex: index,
|
|
7246
|
+
$rowIndex: -1
|
|
7247
|
+
};
|
|
7248
|
+
if (reMinWidth) {
|
|
7249
|
+
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);
|
|
7250
|
+
}
|
|
7251
|
+
if (reMaxWidth) {
|
|
7252
|
+
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);
|
|
7253
|
+
}
|
|
7254
|
+
}
|
|
7308
7255
|
const isChecked = column.renderVisible;
|
|
7309
7256
|
const isIndeterminate = column.halfVisible;
|
|
7310
7257
|
const colTitle = formatText(column.getTitle(), 1);
|
|
@@ -7363,10 +7310,12 @@ const {
|
|
|
7363
7310
|
title: colTitle
|
|
7364
7311
|
}, colTitle)]), allowResizable ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('td', {
|
|
7365
7312
|
class: 'vxe-table-custom-popup--column-item col--resizable'
|
|
7366
|
-
}, [column.children && column.children.length ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', '-') :
|
|
7313
|
+
}, [column.children && column.children.length ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', '-') : VxeUINumberInputComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUINumberInputComponent, {
|
|
7367
7314
|
type: 'integer',
|
|
7368
7315
|
disabled: isDisabled || isHidden,
|
|
7369
7316
|
modelValue: column.renderResizeWidth,
|
|
7317
|
+
min: customMinWidth || undefined,
|
|
7318
|
+
max: customMaxWidth || undefined,
|
|
7370
7319
|
'onUpdate:modelValue'(value) {
|
|
7371
7320
|
column.renderResizeWidth = Math.max(0, Number(value));
|
|
7372
7321
|
}
|
|
@@ -7396,36 +7345,28 @@ const {
|
|
|
7396
7345
|
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()]) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()]));
|
|
7397
7346
|
}
|
|
7398
7347
|
});
|
|
7399
|
-
const isAllChecked = customStore.isAll;
|
|
7400
|
-
const isAllIndeterminate = customStore.isIndeterminate;
|
|
7401
|
-
const dragColumn = dragColumnRef.value;
|
|
7402
7348
|
const scopedSlots = {
|
|
7403
7349
|
default: () => {
|
|
7350
|
+
if (defaultSlot) {
|
|
7351
|
+
return $xeTable.callSlot(defaultSlot, params);
|
|
7352
|
+
}
|
|
7404
7353
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7405
7354
|
ref: bodyElemRef,
|
|
7406
7355
|
class: 'vxe-table-custom-popup--body'
|
|
7407
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7356
|
+
}, [topSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7357
|
+
class: 'vxe-table-custom-popup--table-top'
|
|
7358
|
+
}, $xeTable.callSlot(topSlot, params)) : panel_renderEmptyElement($xeTable), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7408
7359
|
class: 'vxe-table-custom-popup--table-wrapper'
|
|
7409
7360
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('table', {}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('colgroup', {}, [allowVisible ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
|
|
7410
|
-
|
|
7411
|
-
width: '80px'
|
|
7412
|
-
}
|
|
7361
|
+
class: 'vxe-table-custom-popup--table-col-seq'
|
|
7413
7362
|
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)(), allowSort ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
|
|
7414
|
-
|
|
7415
|
-
width: '80px'
|
|
7416
|
-
}
|
|
7363
|
+
class: 'vxe-table-custom-popup--table-col-sort'
|
|
7417
7364
|
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
|
|
7418
|
-
|
|
7419
|
-
minWidth: '120px'
|
|
7420
|
-
}
|
|
7365
|
+
class: 'vxe-table-custom-popup--table-col-title'
|
|
7421
7366
|
}), allowResizable ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
|
|
7422
|
-
|
|
7423
|
-
width: '140px'
|
|
7424
|
-
}
|
|
7367
|
+
class: 'vxe-table-custom-popup--table-col-width'
|
|
7425
7368
|
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)(), allowFixed ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('col', {
|
|
7426
|
-
|
|
7427
|
-
width: '200px'
|
|
7428
|
-
}
|
|
7369
|
+
class: 'vxe-table-custom-popup--table-col-fixed'
|
|
7429
7370
|
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('thead', {}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('tr', {}, [allowVisible ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', {}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7430
7371
|
class: ['vxe-table-custom--checkbox-option', {
|
|
7431
7372
|
'is--checked': isAllChecked,
|
|
@@ -7450,17 +7391,22 @@ const {
|
|
|
7450
7391
|
});
|
|
7451
7392
|
}
|
|
7452
7393
|
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()]) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', {}, panel_getI18n('vxe.custom.setting.colTitle')), allowResizable ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', {}, panel_getI18n('vxe.custom.setting.colResizable')) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)(), allowFixed ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('th', {}, panel_getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(external_commonjs_vue_commonjs2_vue_root_Vue_.TransitionGroup, {
|
|
7453
|
-
class: 'vxe-table-custom--
|
|
7394
|
+
class: 'vxe-table-custom--panel-list',
|
|
7454
7395
|
tag: 'tbody',
|
|
7455
7396
|
name: 'vxe-table-custom--list'
|
|
7456
7397
|
}, {
|
|
7457
7398
|
default: () => trVNs
|
|
7458
|
-
})])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7399
|
+
})])]), bottomSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7400
|
+
class: 'vxe-table-custom-popup--table-bottom'
|
|
7401
|
+
}, $xeTable.callSlot(bottomSlot, params)) : panel_renderEmptyElement($xeTable), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7459
7402
|
ref: dragHintElemRef,
|
|
7460
7403
|
class: 'vxe-table-custom-popup--drag-hint'
|
|
7461
7404
|
}, panel_getI18n('vxe.custom.cstmDragTarget', [dragColumn ? dragColumn.getTitle() : '']))]);
|
|
7462
7405
|
},
|
|
7463
7406
|
footer: () => {
|
|
7407
|
+
if (footerSlot) {
|
|
7408
|
+
return $xeTable.callSlot(footerSlot, params);
|
|
7409
|
+
}
|
|
7464
7410
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7465
7411
|
class: 'vxe-table-custom-popup--footer'
|
|
7466
7412
|
}, [VxeUIButtonComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIButtonComponent, {
|
|
@@ -7476,6 +7422,9 @@ const {
|
|
|
7476
7422
|
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()]);
|
|
7477
7423
|
}
|
|
7478
7424
|
};
|
|
7425
|
+
if (headerSlot) {
|
|
7426
|
+
scopedSlots.header = () => $xeTable.callSlot(headerSlot, params);
|
|
7427
|
+
}
|
|
7479
7428
|
if (mode === 'drawer') {
|
|
7480
7429
|
return VxeUIDrawerComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIDrawerComponent, {
|
|
7481
7430
|
key: 'drawer',
|
|
@@ -7537,8 +7486,8 @@ const {
|
|
|
7537
7486
|
if (!VxeUIButtonComponent) {
|
|
7538
7487
|
errLog('vxe.error.reqComp', ['vxe-button']);
|
|
7539
7488
|
}
|
|
7540
|
-
if (!
|
|
7541
|
-
errLog('vxe.error.reqComp', ['vxe-input']);
|
|
7489
|
+
if (!VxeUINumberInputComponent) {
|
|
7490
|
+
errLog('vxe.error.reqComp', ['vxe-number-input']);
|
|
7542
7491
|
}
|
|
7543
7492
|
if (!VxeUITooltipComponent) {
|
|
7544
7493
|
errLog('vxe.error.reqComp', ['vxe-tooltip']);
|
|
@@ -8578,7 +8527,8 @@ const {
|
|
|
8578
8527
|
hooks: table_hooks,
|
|
8579
8528
|
globalEvents: table_globalEvents,
|
|
8580
8529
|
GLOBAL_EVENT_KEYS,
|
|
8581
|
-
useFns
|
|
8530
|
+
useFns,
|
|
8531
|
+
renderEmptyElement: table_renderEmptyElement
|
|
8582
8532
|
} = core_.VxeUI;
|
|
8583
8533
|
const isWebkit = browse['-webkit'] && !browse.edge;
|
|
8584
8534
|
const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
@@ -11107,7 +11057,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11107
11057
|
$table: $xeTable,
|
|
11108
11058
|
row
|
|
11109
11059
|
})).then(childRecords => {
|
|
11110
|
-
rowRest
|
|
11060
|
+
if (rowRest) {
|
|
11061
|
+
rowRest.treeLoaded = true;
|
|
11062
|
+
}
|
|
11111
11063
|
if (treeExpandLazyLoadedMaps[rowid]) {
|
|
11112
11064
|
delete treeExpandLazyLoadedMaps[rowid];
|
|
11113
11065
|
}
|
|
@@ -11137,7 +11089,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11137
11089
|
const {
|
|
11138
11090
|
treeExpandLazyLoadedMaps
|
|
11139
11091
|
} = reactData;
|
|
11140
|
-
rowRest
|
|
11092
|
+
if (rowRest) {
|
|
11093
|
+
rowRest.treeLoaded = false;
|
|
11094
|
+
}
|
|
11141
11095
|
if (treeExpandLazyLoadedMaps[rowid]) {
|
|
11142
11096
|
delete treeExpandLazyLoadedMaps[rowid];
|
|
11143
11097
|
}
|
|
@@ -11188,10 +11142,14 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11188
11142
|
const {
|
|
11189
11143
|
rowExpandedMaps
|
|
11190
11144
|
} = reactData;
|
|
11191
|
-
rowRest
|
|
11145
|
+
if (rowRest) {
|
|
11146
|
+
rowRest.expandLoaded = true;
|
|
11147
|
+
}
|
|
11192
11148
|
rowExpandedMaps[rowid] = row;
|
|
11193
11149
|
}).catch(() => {
|
|
11194
|
-
rowRest
|
|
11150
|
+
if (rowRest) {
|
|
11151
|
+
rowRest.expandLoaded = false;
|
|
11152
|
+
}
|
|
11195
11153
|
}).finally(() => {
|
|
11196
11154
|
const {
|
|
11197
11155
|
rowExpandLazyLoadedMaps
|
|
@@ -11747,13 +11705,15 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11747
11705
|
const rowid = getRowid($xeTable, row);
|
|
11748
11706
|
if (!treeTempExpandedMaps[rowid]) {
|
|
11749
11707
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
11750
|
-
|
|
11751
|
-
|
|
11752
|
-
|
|
11753
|
-
|
|
11754
|
-
|
|
11755
|
-
|
|
11756
|
-
|
|
11708
|
+
if (rowRest) {
|
|
11709
|
+
const isLoad = lazy && row[hasChildField] && !rowRest.treeLoaded && !treeExpandLazyLoadedMaps[rowid];
|
|
11710
|
+
// 是否使用懒加载
|
|
11711
|
+
if (isLoad) {
|
|
11712
|
+
result.push(handleAsyncTreeExpandChilds(row));
|
|
11713
|
+
} else {
|
|
11714
|
+
if (row[childrenField] && row[childrenField].length) {
|
|
11715
|
+
treeTempExpandedMaps[rowid] = row;
|
|
11716
|
+
}
|
|
11757
11717
|
}
|
|
11758
11718
|
}
|
|
11759
11719
|
}
|
|
@@ -12776,38 +12736,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
12776
12736
|
* 如果已关联工具栏,则会同步更新
|
|
12777
12737
|
*/
|
|
12778
12738
|
resetColumn(options) {
|
|
12779
|
-
|
|
12780
|
-
|
|
12781
|
-
} = internalData;
|
|
12782
|
-
const customOpts = computeCustomOpts.value;
|
|
12783
|
-
const {
|
|
12784
|
-
checkMethod
|
|
12785
|
-
} = customOpts;
|
|
12786
|
-
const opts = Object.assign({
|
|
12787
|
-
visible: true,
|
|
12788
|
-
resizable: options === true,
|
|
12789
|
-
fixed: options === true,
|
|
12790
|
-
sort: options === true
|
|
12791
|
-
}, options);
|
|
12792
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, column => {
|
|
12793
|
-
if (opts.resizable) {
|
|
12794
|
-
column.resizeWidth = 0;
|
|
12795
|
-
}
|
|
12796
|
-
if (opts.fixed) {
|
|
12797
|
-
column.fixed = column.defaultFixed;
|
|
12798
|
-
}
|
|
12799
|
-
if (opts.sort) {
|
|
12800
|
-
column.renderSortNumber = column.sortNumber;
|
|
12801
|
-
}
|
|
12802
|
-
if (!checkMethod || checkMethod({
|
|
12803
|
-
column
|
|
12804
|
-
})) {
|
|
12805
|
-
column.visible = column.defaultVisible;
|
|
12806
|
-
}
|
|
12807
|
-
column.renderResizeWidth = column.renderWidth;
|
|
12808
|
-
});
|
|
12809
|
-
$xeTable.saveCustomStore('reset');
|
|
12810
|
-
return tablePrivateMethods.handleCustom();
|
|
12739
|
+
warnLog('vxe.error.delFunc', ['resetColumn', 'resetCustom']);
|
|
12740
|
+
return $xeTable.resetCustom(options);
|
|
12811
12741
|
},
|
|
12812
12742
|
/**
|
|
12813
12743
|
* 刷新列信息
|
|
@@ -14911,7 +14841,22 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14911
14841
|
}
|
|
14912
14842
|
};
|
|
14913
14843
|
const updateRowDropTipContent = tdEl => {
|
|
14914
|
-
|
|
14844
|
+
const {
|
|
14845
|
+
dragRow
|
|
14846
|
+
} = reactData;
|
|
14847
|
+
const dragOpts = computeDragOpts.value;
|
|
14848
|
+
const {
|
|
14849
|
+
rowTooltipMethod
|
|
14850
|
+
} = dragOpts;
|
|
14851
|
+
let tipContent = '';
|
|
14852
|
+
if (rowTooltipMethod) {
|
|
14853
|
+
tipContent = `${rowTooltipMethod({
|
|
14854
|
+
row: dragRow
|
|
14855
|
+
}) || ''}`;
|
|
14856
|
+
} else {
|
|
14857
|
+
tipContent = table_getI18n('vxe.table.dragTip', [tdEl.textContent || '']);
|
|
14858
|
+
}
|
|
14859
|
+
reactData.dragTipText = tipContent;
|
|
14915
14860
|
};
|
|
14916
14861
|
/**
|
|
14917
14862
|
* 处理显示 tooltip
|
|
@@ -14952,6 +14897,17 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14952
14897
|
}
|
|
14953
14898
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
14954
14899
|
};
|
|
14900
|
+
const callSlot = (slotFunc, params) => {
|
|
14901
|
+
if (slotFunc) {
|
|
14902
|
+
if ($xeGrid) {
|
|
14903
|
+
return $xeGrid.callSlot(slotFunc, params);
|
|
14904
|
+
}
|
|
14905
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(slotFunc)) {
|
|
14906
|
+
return getSlotVNs(slotFunc(params));
|
|
14907
|
+
}
|
|
14908
|
+
}
|
|
14909
|
+
return [];
|
|
14910
|
+
};
|
|
14955
14911
|
/**
|
|
14956
14912
|
* 内部方法
|
|
14957
14913
|
*/
|
|
@@ -14960,17 +14916,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14960
14916
|
return table_getConfig();
|
|
14961
14917
|
},
|
|
14962
14918
|
updateAfterDataIndex,
|
|
14963
|
-
callSlot
|
|
14964
|
-
if (slotFunc) {
|
|
14965
|
-
if ($xeGrid) {
|
|
14966
|
-
return $xeGrid.callSlot(slotFunc, params);
|
|
14967
|
-
}
|
|
14968
|
-
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(slotFunc)) {
|
|
14969
|
-
return getSlotVNs(slotFunc(params));
|
|
14970
|
-
}
|
|
14971
|
-
}
|
|
14972
|
-
return [];
|
|
14973
|
-
},
|
|
14919
|
+
callSlot,
|
|
14974
14920
|
/**
|
|
14975
14921
|
* 获取父容器元素
|
|
14976
14922
|
*/
|
|
@@ -16730,7 +16676,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16730
16676
|
tableColumn,
|
|
16731
16677
|
tableGroupColumn,
|
|
16732
16678
|
fixedColumn
|
|
16733
|
-
}) : (
|
|
16679
|
+
}) : table_renderEmptyElement($xeTable), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(body, {
|
|
16734
16680
|
ref: isFixedLeft ? refTableLeftBody : refTableRightBody,
|
|
16735
16681
|
fixedType,
|
|
16736
16682
|
tableData,
|
|
@@ -16742,7 +16688,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16742
16688
|
tableColumn,
|
|
16743
16689
|
fixedColumn,
|
|
16744
16690
|
fixedType
|
|
16745
|
-
}) : (
|
|
16691
|
+
}) : table_renderEmptyElement($xeTable)]);
|
|
16746
16692
|
};
|
|
16747
16693
|
const renderEmptyBody = () => {
|
|
16748
16694
|
const emptyOpts = computeEmptyOpts.value;
|
|
@@ -16797,7 +16743,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16797
16743
|
columnStore,
|
|
16798
16744
|
filterStore,
|
|
16799
16745
|
customStore,
|
|
16800
|
-
tooltipStore
|
|
16746
|
+
tooltipStore,
|
|
16747
|
+
dragRow,
|
|
16748
|
+
dragTipText
|
|
16801
16749
|
} = reactData;
|
|
16802
16750
|
const {
|
|
16803
16751
|
leftList,
|
|
@@ -16809,6 +16757,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16809
16757
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
16810
16758
|
const treeOpts = computeTreeOpts.value;
|
|
16811
16759
|
const rowOpts = computeRowOpts.value;
|
|
16760
|
+
const dragOpts = computeDragOpts.value;
|
|
16812
16761
|
const columnOpts = computeColumnOpts.value;
|
|
16813
16762
|
const vSize = computeSize.value;
|
|
16814
16763
|
const tableBorder = computeTableBorder.value;
|
|
@@ -16818,6 +16767,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16818
16767
|
const isMenu = computeIsMenu.value;
|
|
16819
16768
|
const currLoading = reactData._isLoading || loading;
|
|
16820
16769
|
const virtualScrollBars = computeVirtualScrollBars.value;
|
|
16770
|
+
const dragSlots = dragOpts.slots || {};
|
|
16771
|
+
const rowTipSlot = dragSlots.rowTip;
|
|
16821
16772
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16822
16773
|
ref: refElem,
|
|
16823
16774
|
class: ['vxe-table', 'vxe-table--render-default', `tid_${xID}`, `border--${tableBorder}`, {
|
|
@@ -16871,7 +16822,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16871
16822
|
tableData,
|
|
16872
16823
|
tableColumn,
|
|
16873
16824
|
tableGroupColumn
|
|
16874
|
-
}) : (
|
|
16825
|
+
}) : table_renderEmptyElement($xeTable),
|
|
16875
16826
|
/**
|
|
16876
16827
|
* 表体
|
|
16877
16828
|
*/
|
|
@@ -16887,9 +16838,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16887
16838
|
ref: refTableFooter,
|
|
16888
16839
|
footerTableData,
|
|
16889
16840
|
tableColumn
|
|
16890
|
-
}) : (
|
|
16841
|
+
}) : table_renderEmptyElement($xeTable)]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16891
16842
|
class: 'vxe-table--fixed-wrapper'
|
|
16892
|
-
}, [leftList && leftList.length && overflowX ? renderFixed('left') : (
|
|
16843
|
+
}, [leftList && leftList.length && overflowX ? renderFixed('left') : table_renderEmptyElement($xeTable), rightList && rightList.length && overflowX ? renderFixed('right') : table_renderEmptyElement($xeTable)])]), virtualScrollBars.x ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16893
16844
|
key: 'vx',
|
|
16894
16845
|
ref: refScrollXVirtualElem,
|
|
16895
16846
|
class: 'vxe-table--scroll-x-virtual'
|
|
@@ -16900,7 +16851,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16900
16851
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16901
16852
|
ref: refScrollXSpaceElem,
|
|
16902
16853
|
class: 'vxe-table--scroll-x-space'
|
|
16903
|
-
})])]) : (
|
|
16854
|
+
})])]) : table_renderEmptyElement($xeTable), virtualScrollBars.y ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16904
16855
|
key: 'vy',
|
|
16905
16856
|
ref: refScrollYVirtualElem,
|
|
16906
16857
|
class: 'vxe-table--scroll-y-virtual'
|
|
@@ -16911,7 +16862,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16911
16862
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16912
16863
|
ref: refScrollYSpaceElem,
|
|
16913
16864
|
class: 'vxe-table--scroll-x-space'
|
|
16914
|
-
})])]) : (
|
|
16865
|
+
})])]) : table_renderEmptyElement($xeTable),
|
|
16915
16866
|
/**
|
|
16916
16867
|
* 空数据
|
|
16917
16868
|
*/
|
|
@@ -16954,7 +16905,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16954
16905
|
$table: $xeTable,
|
|
16955
16906
|
$grid: $xeGrid
|
|
16956
16907
|
})
|
|
16957
|
-
} : {}) : (
|
|
16908
|
+
} : {}) : table_renderEmptyElement($xeTable),
|
|
16958
16909
|
/**
|
|
16959
16910
|
* 自定义列
|
|
16960
16911
|
*/
|
|
@@ -16962,7 +16913,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16962
16913
|
key: 'cs',
|
|
16963
16914
|
ref: refTableCustom,
|
|
16964
16915
|
customStore
|
|
16965
|
-
}) : (
|
|
16916
|
+
}) : table_renderEmptyElement($xeTable),
|
|
16966
16917
|
/**
|
|
16967
16918
|
* 筛选
|
|
16968
16919
|
*/
|
|
@@ -16970,7 +16921,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16970
16921
|
key: 'tf',
|
|
16971
16922
|
ref: refTableFilter,
|
|
16972
16923
|
filterStore
|
|
16973
|
-
}) : (
|
|
16924
|
+
}) : table_renderEmptyElement($xeTable),
|
|
16974
16925
|
/**
|
|
16975
16926
|
* 导入
|
|
16976
16927
|
*/
|
|
@@ -16978,7 +16929,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16978
16929
|
key: 'it',
|
|
16979
16930
|
defaultOptions: reactData.importParams,
|
|
16980
16931
|
storeData: reactData.importStore
|
|
16981
|
-
}) : (
|
|
16932
|
+
}) : table_renderEmptyElement($xeTable),
|
|
16982
16933
|
/**
|
|
16983
16934
|
* 导出
|
|
16984
16935
|
*/
|
|
@@ -16986,21 +16937,23 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16986
16937
|
key: 'et',
|
|
16987
16938
|
defaultOptions: reactData.exportParams,
|
|
16988
16939
|
storeData: reactData.exportStore
|
|
16989
|
-
}) : (
|
|
16940
|
+
}) : table_renderEmptyElement($xeTable),
|
|
16990
16941
|
/**
|
|
16991
16942
|
* 快捷菜单
|
|
16992
16943
|
*/
|
|
16993
16944
|
isMenu ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(menu_panel, {
|
|
16994
16945
|
key: 'tm',
|
|
16995
16946
|
ref: refTableMenu
|
|
16996
|
-
}) : (
|
|
16947
|
+
}) : table_renderEmptyElement($xeTable),
|
|
16997
16948
|
/**
|
|
16998
16949
|
* 拖拽提示
|
|
16999
16950
|
*/
|
|
17000
|
-
rowOpts.drag ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
16951
|
+
rowOpts.drag && (dragRow || dragTipText) ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
17001
16952
|
ref: refRowDragTipElem,
|
|
17002
|
-
class: 'vxe-table--row-drag-
|
|
17003
|
-
},
|
|
16953
|
+
class: 'vxe-table--row-drag-tip'
|
|
16954
|
+
}, rowTipSlot ? dragRow ? callSlot(rowTipSlot, {
|
|
16955
|
+
row: dragRow
|
|
16956
|
+
}) : [table_renderEmptyElement($xeTable)] : dragTipText ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', dragTipText)] : [table_renderEmptyElement($xeTable)]) : table_renderEmptyElement($xeTable),
|
|
17004
16957
|
/**
|
|
17005
16958
|
* 提示相关
|
|
17006
16959
|
*/
|
|
@@ -17031,7 +16984,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
17031
16984
|
'old-cell-valid': editRules && table_getConfig().cellVaildMode === 'obsolete'
|
|
17032
16985
|
}, 'vxe-table--valid-error'],
|
|
17033
16986
|
...(validOpts.message === 'tooltip' || tableData.length === 1 ? validTipOpts : {})
|
|
17034
|
-
}) : (
|
|
16987
|
+
}) : table_renderEmptyElement($xeTable)]) : table_renderEmptyElement($xeTable)]);
|
|
17035
16988
|
};
|
|
17036
16989
|
const dataFlag = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);
|
|
17037
16990
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.data ? props.data.length : -1, () => {
|
|
@@ -21622,7 +21575,7 @@ validator_hook_hooks.add('tableValidatorModule', {
|
|
|
21622
21575
|
const validOpts = computeValidOpts.value;
|
|
21623
21576
|
if (validOpts.msgMode === 'single') {
|
|
21624
21577
|
const keys = Object.keys(validErrMaps);
|
|
21625
|
-
const resMaps =
|
|
21578
|
+
const resMaps = {};
|
|
21626
21579
|
if (keys.length) {
|
|
21627
21580
|
const firstKey = keys[0];
|
|
21628
21581
|
resMaps[firstKey] = validErrMaps[firstKey];
|
|
@@ -22128,7 +22081,7 @@ validator_hook_hooks.add('tableValidatorModule', {
|
|
|
22128
22081
|
|
|
22129
22082
|
|
|
22130
22083
|
|
|
22131
|
-
const tableCustomMethodKeys = ['openCustom', 'closeCustom'];
|
|
22084
|
+
const tableCustomMethodKeys = ['openCustom', 'closeCustom', 'saveCustom', 'cancelCustom', 'resetCustom', 'toggleCustomAllCheckbox', 'setCustomAllCheckbox'];
|
|
22132
22085
|
core_.VxeUI.hooks.add('tableCustomModule', {
|
|
22133
22086
|
setupTable($xeTable) {
|
|
22134
22087
|
const {
|
|
@@ -22152,7 +22105,7 @@ core_.VxeUI.hooks.add('tableCustomModule', {
|
|
|
22152
22105
|
if (el) {
|
|
22153
22106
|
tableHeight = el.clientHeight - 28;
|
|
22154
22107
|
}
|
|
22155
|
-
customStore.maxHeight = Math.max(
|
|
22108
|
+
customStore.maxHeight = Math.max(88, tableHeight);
|
|
22156
22109
|
};
|
|
22157
22110
|
const openCustom = () => {
|
|
22158
22111
|
const {
|
|
@@ -22199,9 +22152,183 @@ core_.VxeUI.hooks.add('tableCustomModule', {
|
|
|
22199
22152
|
}
|
|
22200
22153
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
22201
22154
|
};
|
|
22155
|
+
const saveCustom = () => {
|
|
22156
|
+
const {
|
|
22157
|
+
customColumnList
|
|
22158
|
+
} = reactData;
|
|
22159
|
+
const customOpts = computeCustomOpts.value;
|
|
22160
|
+
const {
|
|
22161
|
+
allowVisible,
|
|
22162
|
+
allowSort,
|
|
22163
|
+
allowFixed,
|
|
22164
|
+
allowResizable
|
|
22165
|
+
} = customOpts;
|
|
22166
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
22167
|
+
if (parent) {
|
|
22168
|
+
// 更新子列信息
|
|
22169
|
+
column.fixed = parent.fixed;
|
|
22170
|
+
} else {
|
|
22171
|
+
if (allowSort) {
|
|
22172
|
+
const sortIndex = index + 1;
|
|
22173
|
+
column.renderSortNumber = sortIndex;
|
|
22174
|
+
}
|
|
22175
|
+
if (allowFixed) {
|
|
22176
|
+
column.fixed = column.renderFixed;
|
|
22177
|
+
}
|
|
22178
|
+
}
|
|
22179
|
+
if (allowResizable) {
|
|
22180
|
+
if (column.renderVisible && (!column.children || column.children.length)) {
|
|
22181
|
+
if (column.renderResizeWidth !== column.renderWidth) {
|
|
22182
|
+
column.resizeWidth = column.renderResizeWidth;
|
|
22183
|
+
column.renderWidth = column.renderResizeWidth;
|
|
22184
|
+
}
|
|
22185
|
+
}
|
|
22186
|
+
}
|
|
22187
|
+
if (allowVisible) {
|
|
22188
|
+
column.visible = column.renderVisible;
|
|
22189
|
+
}
|
|
22190
|
+
});
|
|
22191
|
+
return $xeTable.saveCustomStore('confirm');
|
|
22192
|
+
};
|
|
22193
|
+
const cancelCustom = () => {
|
|
22194
|
+
const {
|
|
22195
|
+
customColumnList,
|
|
22196
|
+
customStore
|
|
22197
|
+
} = reactData;
|
|
22198
|
+
const {
|
|
22199
|
+
oldSortMaps,
|
|
22200
|
+
oldFixedMaps,
|
|
22201
|
+
oldVisibleMaps
|
|
22202
|
+
} = customStore;
|
|
22203
|
+
const customOpts = computeCustomOpts.value;
|
|
22204
|
+
const {
|
|
22205
|
+
allowVisible,
|
|
22206
|
+
allowSort,
|
|
22207
|
+
allowFixed,
|
|
22208
|
+
allowResizable
|
|
22209
|
+
} = customOpts;
|
|
22210
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
22211
|
+
const colid = column.getKey();
|
|
22212
|
+
const visible = !!oldVisibleMaps[colid];
|
|
22213
|
+
const fixed = oldFixedMaps[colid] || '';
|
|
22214
|
+
if (allowVisible) {
|
|
22215
|
+
column.renderVisible = visible;
|
|
22216
|
+
column.visible = visible;
|
|
22217
|
+
}
|
|
22218
|
+
if (allowFixed) {
|
|
22219
|
+
column.renderFixed = fixed;
|
|
22220
|
+
column.fixed = fixed;
|
|
22221
|
+
}
|
|
22222
|
+
if (allowSort) {
|
|
22223
|
+
column.renderSortNumber = oldSortMaps[colid] || 0;
|
|
22224
|
+
}
|
|
22225
|
+
if (allowResizable) {
|
|
22226
|
+
column.renderResizeWidth = column.renderWidth;
|
|
22227
|
+
}
|
|
22228
|
+
}, {
|
|
22229
|
+
children: 'children'
|
|
22230
|
+
});
|
|
22231
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
22232
|
+
};
|
|
22233
|
+
const setCustomAllCheckbox = checked => {
|
|
22234
|
+
const {
|
|
22235
|
+
customStore
|
|
22236
|
+
} = reactData;
|
|
22237
|
+
const {
|
|
22238
|
+
customColumnList
|
|
22239
|
+
} = reactData;
|
|
22240
|
+
const customOpts = computeCustomOpts.value;
|
|
22241
|
+
const {
|
|
22242
|
+
checkMethod,
|
|
22243
|
+
visibleMethod
|
|
22244
|
+
} = customOpts;
|
|
22245
|
+
const isAll = !!checked;
|
|
22246
|
+
if (customOpts.immediate) {
|
|
22247
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
22248
|
+
if (visibleMethod && !visibleMethod({
|
|
22249
|
+
column
|
|
22250
|
+
})) {
|
|
22251
|
+
return;
|
|
22252
|
+
}
|
|
22253
|
+
if (checkMethod && !checkMethod({
|
|
22254
|
+
column
|
|
22255
|
+
})) {
|
|
22256
|
+
return;
|
|
22257
|
+
}
|
|
22258
|
+
column.visible = isAll;
|
|
22259
|
+
column.renderVisible = isAll;
|
|
22260
|
+
column.halfVisible = false;
|
|
22261
|
+
});
|
|
22262
|
+
customStore.isAll = isAll;
|
|
22263
|
+
$xeTable.handleCustom();
|
|
22264
|
+
$xeTable.saveCustomStore('update:visible');
|
|
22265
|
+
} else {
|
|
22266
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
22267
|
+
if (visibleMethod && !visibleMethod({
|
|
22268
|
+
column
|
|
22269
|
+
})) {
|
|
22270
|
+
return;
|
|
22271
|
+
}
|
|
22272
|
+
if (checkMethod && !checkMethod({
|
|
22273
|
+
column
|
|
22274
|
+
})) {
|
|
22275
|
+
return;
|
|
22276
|
+
}
|
|
22277
|
+
column.renderVisible = isAll;
|
|
22278
|
+
column.halfVisible = false;
|
|
22279
|
+
});
|
|
22280
|
+
customStore.isAll = isAll;
|
|
22281
|
+
}
|
|
22282
|
+
$xeTable.checkCustomStatus();
|
|
22283
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
22284
|
+
};
|
|
22202
22285
|
const customMethods = {
|
|
22203
22286
|
openCustom,
|
|
22204
|
-
closeCustom
|
|
22287
|
+
closeCustom,
|
|
22288
|
+
saveCustom,
|
|
22289
|
+
cancelCustom,
|
|
22290
|
+
resetCustom(options) {
|
|
22291
|
+
const {
|
|
22292
|
+
collectColumn
|
|
22293
|
+
} = internalData;
|
|
22294
|
+
const customOpts = computeCustomOpts.value;
|
|
22295
|
+
const {
|
|
22296
|
+
checkMethod
|
|
22297
|
+
} = customOpts;
|
|
22298
|
+
const opts = Object.assign({
|
|
22299
|
+
visible: true,
|
|
22300
|
+
resizable: options === true,
|
|
22301
|
+
fixed: options === true,
|
|
22302
|
+
sort: options === true
|
|
22303
|
+
}, options);
|
|
22304
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, column => {
|
|
22305
|
+
if (opts.resizable) {
|
|
22306
|
+
column.resizeWidth = 0;
|
|
22307
|
+
}
|
|
22308
|
+
if (opts.fixed) {
|
|
22309
|
+
column.fixed = column.defaultFixed;
|
|
22310
|
+
}
|
|
22311
|
+
if (opts.sort) {
|
|
22312
|
+
column.renderSortNumber = column.sortNumber;
|
|
22313
|
+
}
|
|
22314
|
+
if (!checkMethod || checkMethod({
|
|
22315
|
+
column
|
|
22316
|
+
})) {
|
|
22317
|
+
column.visible = column.defaultVisible;
|
|
22318
|
+
}
|
|
22319
|
+
column.renderResizeWidth = column.renderWidth;
|
|
22320
|
+
});
|
|
22321
|
+
$xeTable.saveCustomStore('reset');
|
|
22322
|
+
return $xeTable.handleCustom();
|
|
22323
|
+
},
|
|
22324
|
+
toggleCustomAllCheckbox() {
|
|
22325
|
+
const {
|
|
22326
|
+
customStore
|
|
22327
|
+
} = reactData;
|
|
22328
|
+
const isAll = !customStore.isAll;
|
|
22329
|
+
return setCustomAllCheckbox(isAll);
|
|
22330
|
+
},
|
|
22331
|
+
setCustomAllCheckbox
|
|
22205
22332
|
};
|
|
22206
22333
|
const checkCustomStatus = () => {
|
|
22207
22334
|
const {
|
|
@@ -24817,7 +24944,7 @@ const gridComponentEmits = [...emits, 'page-change', 'form-submit', 'form-submit
|
|
|
24817
24944
|
$xeTable.openExport(btnParams);
|
|
24818
24945
|
break;
|
|
24819
24946
|
case 'reset_custom':
|
|
24820
|
-
return $xeTable.
|
|
24947
|
+
return $xeTable.resetCustom(true);
|
|
24821
24948
|
case '_init':
|
|
24822
24949
|
case 'reload':
|
|
24823
24950
|
case 'query':
|