vxe-table 3.21.11 → 3.21.13
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/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/menu/panel.js +7 -7
- package/es/table/src/cell.js +17 -13
- package/es/table/src/columnInfo.js +85 -81
- package/es/table/src/methods.js +6 -2
- package/es/table/src/table.js +1 -1
- package/es/table/style.css +29 -13
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +29 -13
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +264 -250
- 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/menu/panel.js +8 -8
- package/lib/table/module/menu/panel.min.js +1 -1
- package/lib/table/src/cell.js +6 -4
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/columnInfo.js +93 -81
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +2 -2
- 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/table/style/style.css +29 -13
- package/lib/table/style/style.min.css +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/lib/vxe-table/style/style.css +29 -13
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/table/module/menu/panel.ts +7 -7
- package/packages/table/src/cell.ts +17 -13
- package/packages/table/src/columnInfo.ts +90 -84
- package/packages/table/src/methods.ts +6 -2
- package/packages/table/src/table.ts +1 -1
- package/packages/table/src/util.ts +1 -1
- package/styles/components/table-module/menu.scss +5 -2
- package/styles/components/table.scss +24 -6
- /package/es/{iconfont.1781074394243.ttf → iconfont.1781229212834.ttf} +0 -0
- /package/es/{iconfont.1781074394243.woff → iconfont.1781229212834.woff} +0 -0
- /package/es/{iconfont.1781074394243.woff2 → iconfont.1781229212834.woff2} +0 -0
- /package/lib/{iconfont.1781074394243.ttf → iconfont.1781229212834.ttf} +0 -0
- /package/lib/{iconfont.1781074394243.woff → iconfont.1781229212834.woff} +0 -0
- /package/lib/{iconfont.1781074394243.woff2 → iconfont.1781229212834.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -3311,7 +3311,7 @@ function getClass(property, params) {
|
|
|
3311
3311
|
/* unused harmony import specifier */ var VxeUI;
|
|
3312
3312
|
|
|
3313
3313
|
|
|
3314
|
-
const version = "3.21.
|
|
3314
|
+
const version = "3.21.13";
|
|
3315
3315
|
core_.VxeUI.version = version;
|
|
3316
3316
|
core_.VxeUI.tableVersion = version;
|
|
3317
3317
|
core_.VxeUI.setConfig({
|
|
@@ -3837,240 +3837,6 @@ var es_iterator_map = __webpack_require__(1701);
|
|
|
3837
3837
|
var es_iterator_reduce = __webpack_require__(8237);
|
|
3838
3838
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.some.js
|
|
3839
3839
|
var es_iterator_some = __webpack_require__(3579);
|
|
3840
|
-
;// ./packages/ui/src/log.ts
|
|
3841
|
-
|
|
3842
|
-
const {
|
|
3843
|
-
log: log_log
|
|
3844
|
-
} = core_.VxeUI;
|
|
3845
|
-
const log_version = `table v${"3.21.11"}`;
|
|
3846
|
-
const warnLog = log_log.create('warn', log_version);
|
|
3847
|
-
const errLog = log_log.create('error', log_version);
|
|
3848
|
-
;// ./packages/table/src/columnInfo.ts
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
const {
|
|
3855
|
-
getI18n: columnInfo_getI18n,
|
|
3856
|
-
formats: columnInfo_formats,
|
|
3857
|
-
renderer: columnInfo_renderer
|
|
3858
|
-
} = core_.VxeUI;
|
|
3859
|
-
class ColumnInfo {
|
|
3860
|
-
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
3861
|
-
constructor($xeTable, _vm, {
|
|
3862
|
-
renderHeader,
|
|
3863
|
-
renderCell,
|
|
3864
|
-
renderFooter,
|
|
3865
|
-
renderData
|
|
3866
|
-
} = {}) {
|
|
3867
|
-
const tableProps = $xeTable;
|
|
3868
|
-
const $xeGrid = $xeTable.$xeGrid;
|
|
3869
|
-
const $xeGantt = $xeTable.$xeGantt;
|
|
3870
|
-
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
3871
|
-
const {
|
|
3872
|
-
field,
|
|
3873
|
-
editRender,
|
|
3874
|
-
filterRender
|
|
3875
|
-
} = _vm;
|
|
3876
|
-
const colId = _vm.colId || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId('col_');
|
|
3877
|
-
const proxyOpts = $xeGrid ? $xeGrid.computeProxyOpts : null;
|
|
3878
|
-
const formatter = _vm.formatter;
|
|
3879
|
-
const visible = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(_vm.visible) ? _vm.visible : true;
|
|
3880
|
-
const flCompConf = isEnableConf(filterRender) ? columnInfo_renderer.get(filterRender.name) : null;
|
|
3881
|
-
const ctFilterOptions = flCompConf ? flCompConf.createTableFilterOptions : null;
|
|
3882
|
-
const filters = toFilters(_vm.filters, colId);
|
|
3883
|
-
const types = ['seq', 'checkbox', 'radio', 'expand', 'html'];
|
|
3884
|
-
if (_vm.type && types.indexOf(_vm.type) === -1) {
|
|
3885
|
-
warnLog('vxe.error.errProp', [`type=${_vm.type}`, types.join(', ')]);
|
|
3886
|
-
}
|
|
3887
|
-
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(_vm.cellRender) || _vm.cellRender && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isObject(_vm.cellRender)) {
|
|
3888
|
-
warnLog('vxe.error.errProp', [`column.cell-render=${_vm.cellRender}`, 'column.cell-render={}']);
|
|
3889
|
-
}
|
|
3890
|
-
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(_vm.editRender) || _vm.editRender && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isObject(_vm.editRender)) {
|
|
3891
|
-
warnLog('vxe.error.errProp', [`column.edit-render=${_vm.editRender}`, 'column.edit-render={}']);
|
|
3892
|
-
}
|
|
3893
|
-
if (_vm.type === 'expand') {
|
|
3894
|
-
const {
|
|
3895
|
-
treeConfig
|
|
3896
|
-
} = tableProps;
|
|
3897
|
-
if (treeConfig && ($xeTable.treeOpts.showLine || $xeTable.treeOpts.line)) {
|
|
3898
|
-
errLog('vxe.error.errConflicts', ['tree-config.line', 'column.type=expand']);
|
|
3899
|
-
}
|
|
3900
|
-
}
|
|
3901
|
-
if (_vm.remoteSort) {
|
|
3902
|
-
warnLog('vxe.error.delProp', ['column.remote-sort', 'sort-config.remote']);
|
|
3903
|
-
}
|
|
3904
|
-
if (_vm.sortMethod) {
|
|
3905
|
-
warnLog('vxe.error.delProp', ['column.sort-method', 'sort-config.sortMethod']);
|
|
3906
|
-
}
|
|
3907
|
-
if (formatter) {
|
|
3908
|
-
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(formatter)) {
|
|
3909
|
-
const gFormatOpts = columnInfo_formats.get(formatter) || (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default())[formatter];
|
|
3910
|
-
if (!gFormatOpts || !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod)) {
|
|
3911
|
-
errLog('vxe.error.notFormats', [formatter]);
|
|
3912
|
-
}
|
|
3913
|
-
} else if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(formatter)) {
|
|
3914
|
-
const gFormatOpts = columnInfo_formats.get(formatter[0]) || (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default())[formatter[0]];
|
|
3915
|
-
if (!gFormatOpts || !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod)) {
|
|
3916
|
-
errLog('vxe.error.notFormats', [formatter[0]]);
|
|
3917
|
-
}
|
|
3918
|
-
}
|
|
3919
|
-
}
|
|
3920
|
-
if (_vm.aggFunc) {
|
|
3921
|
-
if (!$xeTable.handlePivotTableAggData && _vm.aggFunc !== true) {
|
|
3922
|
-
errLog('vxe.error.errProp', [`column.agg-func=${_vm.aggFunc}`, 'column.agg-func=true']);
|
|
3923
|
-
}
|
|
3924
|
-
}
|
|
3925
|
-
if (field && editRender) {
|
|
3926
|
-
if (editRender.startField && `${editRender.startField}`.indexOf(field) >= 0) {
|
|
3927
|
-
errLog('vxe.error.modelConflicts', [`field=${field}`, `edit-render.startField=${editRender.startField}`]);
|
|
3928
|
-
}
|
|
3929
|
-
if (editRender.endField && `${editRender.endField}`.indexOf(field) >= 0) {
|
|
3930
|
-
errLog('vxe.error.modelConflicts', [`field=${field}`, `edit-render.endField=${editRender.endField}`]);
|
|
3931
|
-
}
|
|
3932
|
-
}
|
|
3933
|
-
Object.assign(this, {
|
|
3934
|
-
// 基本属性
|
|
3935
|
-
type: _vm.type,
|
|
3936
|
-
property: _vm.field,
|
|
3937
|
-
field: field,
|
|
3938
|
-
title: _vm.title,
|
|
3939
|
-
width: _vm.width,
|
|
3940
|
-
minWidth: _vm.minWidth,
|
|
3941
|
-
maxWidth: _vm.maxWidth,
|
|
3942
|
-
resizable: _vm.resizable,
|
|
3943
|
-
fixed: _vm.fixed,
|
|
3944
|
-
align: _vm.align,
|
|
3945
|
-
headerAlign: _vm.headerAlign,
|
|
3946
|
-
footerAlign: _vm.footerAlign,
|
|
3947
|
-
showOverflow: _vm.showOverflow,
|
|
3948
|
-
showHeaderOverflow: _vm.showHeaderOverflow,
|
|
3949
|
-
showFooterOverflow: _vm.showFooterOverflow,
|
|
3950
|
-
className: _vm.className,
|
|
3951
|
-
headerClassName: _vm.headerClassName,
|
|
3952
|
-
footerClassName: _vm.footerClassName,
|
|
3953
|
-
formatter,
|
|
3954
|
-
headerFormatter: _vm.headerFormatter,
|
|
3955
|
-
footerFormatter: _vm.footerFormatter,
|
|
3956
|
-
padding: _vm.padding,
|
|
3957
|
-
verticalAlign: _vm.verticalAlign,
|
|
3958
|
-
sortable: _vm.sortable,
|
|
3959
|
-
sortBy: _vm.sortBy,
|
|
3960
|
-
sortType: _vm.sortType,
|
|
3961
|
-
sortMethod: _vm.sortMethod,
|
|
3962
|
-
remoteSort: _vm.remoteSort,
|
|
3963
|
-
filters: filters,
|
|
3964
|
-
filterMultiple: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(_vm.filterMultiple) ? _vm.filterMultiple : true,
|
|
3965
|
-
filterMethod: _vm.filterMethod,
|
|
3966
|
-
filterResetMethod: _vm.filterResetMethod,
|
|
3967
|
-
filterRecoverMethod: _vm.filterRecoverMethod,
|
|
3968
|
-
filterRender: filterRender,
|
|
3969
|
-
floatingFilters: _vm.floatingFilters,
|
|
3970
|
-
rules: _vm.rules,
|
|
3971
|
-
rowGroupNode: _vm.rowGroupNode,
|
|
3972
|
-
treeNode: _vm.treeNode,
|
|
3973
|
-
dragSort: _vm.dragSort,
|
|
3974
|
-
rowResize: _vm.rowResize,
|
|
3975
|
-
cellType: _vm.cellType,
|
|
3976
|
-
cellRender: _vm.cellRender,
|
|
3977
|
-
editRender: editRender,
|
|
3978
|
-
contentRender: _vm.contentRender,
|
|
3979
|
-
headerExportMethod: _vm.headerExportMethod,
|
|
3980
|
-
exportMethod: _vm.exportMethod,
|
|
3981
|
-
footerExportMethod: _vm.footerExportMethod,
|
|
3982
|
-
titleHelp: _vm.titleHelp,
|
|
3983
|
-
titlePrefix: _vm.titlePrefix,
|
|
3984
|
-
titleSuffix: _vm.titleSuffix,
|
|
3985
|
-
aggFunc: _vm.aggFunc,
|
|
3986
|
-
copyMethod: _vm.copyMethod,
|
|
3987
|
-
cutMethod: _vm.cutMethod,
|
|
3988
|
-
pasteMethod: _vm.pasteMethod,
|
|
3989
|
-
// 自定义参数
|
|
3990
|
-
params: _vm.params,
|
|
3991
|
-
// 渲染属性
|
|
3992
|
-
id: colId,
|
|
3993
|
-
parentId: null,
|
|
3994
|
-
visible,
|
|
3995
|
-
// 内部属性(一旦被使用,将导致不可升级版本)
|
|
3996
|
-
defaultParentId: null,
|
|
3997
|
-
halfVisible: false,
|
|
3998
|
-
defaultVisible: visible,
|
|
3999
|
-
defaultFixed: _vm.fixed,
|
|
4000
|
-
defaultAggGroup: _vm.aggGroup,
|
|
4001
|
-
defaultAggFunc: _vm.aggFunc,
|
|
4002
|
-
checked: false,
|
|
4003
|
-
halfChecked: false,
|
|
4004
|
-
disabled: false,
|
|
4005
|
-
// 分组层级
|
|
4006
|
-
level: 1,
|
|
4007
|
-
// 跨行
|
|
4008
|
-
rowSpan: 1,
|
|
4009
|
-
// 跨列
|
|
4010
|
-
colSpan: 1,
|
|
4011
|
-
// 数据排序
|
|
4012
|
-
order: null,
|
|
4013
|
-
sortTime: 0,
|
|
4014
|
-
// 列排序
|
|
4015
|
-
sortNumber: 0,
|
|
4016
|
-
renderSortNumber: 0,
|
|
4017
|
-
renderAggFn: '',
|
|
4018
|
-
renderAggDigits: null,
|
|
4019
|
-
renderAggFormat: null,
|
|
4020
|
-
renderFixed: '',
|
|
4021
|
-
renderVisible: false,
|
|
4022
|
-
renderWidth: 0,
|
|
4023
|
-
renderHeight: 0,
|
|
4024
|
-
renderResizeWidth: 0,
|
|
4025
|
-
renderAutoWidth: 0,
|
|
4026
|
-
resizeWidth: 0,
|
|
4027
|
-
renderLeft: 0,
|
|
4028
|
-
renderArgs: [],
|
|
4029
|
-
model: {},
|
|
4030
|
-
renderHeader: renderHeader || _vm.renderHeader,
|
|
4031
|
-
renderCell: renderCell || _vm.renderCell,
|
|
4032
|
-
renderFooter: renderFooter || _vm.renderFooter,
|
|
4033
|
-
renderData,
|
|
4034
|
-
// 单元格插槽,只对 grid 有效
|
|
4035
|
-
slots: _vm.slots
|
|
4036
|
-
});
|
|
4037
|
-
if (ctFilterOptions && (!filters || !filters.length)) {
|
|
4038
|
-
this.filters = toFilters(ctFilterOptions({
|
|
4039
|
-
$table: $xeTable,
|
|
4040
|
-
column: this
|
|
4041
|
-
}), colId);
|
|
4042
|
-
}
|
|
4043
|
-
if ($xeGGWrapper) {
|
|
4044
|
-
if (proxyOpts && proxyOpts.beforeColumn) {
|
|
4045
|
-
proxyOpts.beforeColumn({
|
|
4046
|
-
$table: $xeTable,
|
|
4047
|
-
$grid: $xeGrid,
|
|
4048
|
-
$gantt: $xeGantt,
|
|
4049
|
-
column: this
|
|
4050
|
-
});
|
|
4051
|
-
}
|
|
4052
|
-
}
|
|
4053
|
-
}
|
|
4054
|
-
getTitle() {
|
|
4055
|
-
return getFuncText(this.title || (this.type === 'seq' ? columnInfo_getI18n('vxe.table.seqTitle') : ''));
|
|
4056
|
-
}
|
|
4057
|
-
getKey() {
|
|
4058
|
-
const {
|
|
4059
|
-
type
|
|
4060
|
-
} = this;
|
|
4061
|
-
return this.field || (type ? `type=${type}` : null);
|
|
4062
|
-
}
|
|
4063
|
-
update(name, value) {
|
|
4064
|
-
// 不支持直接修改的属性
|
|
4065
|
-
if (name !== 'filters') {
|
|
4066
|
-
if (name === 'field') {
|
|
4067
|
-
// 兼容旧属性
|
|
4068
|
-
this.property = value;
|
|
4069
|
-
}
|
|
4070
|
-
this[name] = value;
|
|
4071
|
-
}
|
|
4072
|
-
}
|
|
4073
|
-
}
|
|
4074
3840
|
;// ./packages/ui/src/dom.ts
|
|
4075
3841
|
|
|
4076
3842
|
|
|
@@ -4303,6 +4069,252 @@ function wheelScrollTopTo(diffNum, cb) {
|
|
|
4303
4069
|
wtaFrame = null;
|
|
4304
4070
|
});
|
|
4305
4071
|
}
|
|
4072
|
+
;// ./packages/ui/src/log.ts
|
|
4073
|
+
|
|
4074
|
+
const {
|
|
4075
|
+
log: log_log
|
|
4076
|
+
} = core_.VxeUI;
|
|
4077
|
+
const log_version = `table v${"3.21.13"}`;
|
|
4078
|
+
const warnLog = log_log.create('warn', log_version);
|
|
4079
|
+
const errLog = log_log.create('error', log_version);
|
|
4080
|
+
;// ./packages/table/src/columnInfo.ts
|
|
4081
|
+
|
|
4082
|
+
|
|
4083
|
+
|
|
4084
|
+
|
|
4085
|
+
|
|
4086
|
+
|
|
4087
|
+
const {
|
|
4088
|
+
getI18n: columnInfo_getI18n,
|
|
4089
|
+
formats: columnInfo_formats,
|
|
4090
|
+
renderer: columnInfo_renderer
|
|
4091
|
+
} = core_.VxeUI;
|
|
4092
|
+
class ColumnInfo {
|
|
4093
|
+
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
4094
|
+
constructor($xeTable, colConfs, {
|
|
4095
|
+
renderHeader,
|
|
4096
|
+
renderCell,
|
|
4097
|
+
renderFooter,
|
|
4098
|
+
renderData
|
|
4099
|
+
} = {}) {
|
|
4100
|
+
const tableProps = $xeTable;
|
|
4101
|
+
const $xeGrid = $xeTable.$xeGrid;
|
|
4102
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
4103
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
4104
|
+
const {
|
|
4105
|
+
type,
|
|
4106
|
+
field,
|
|
4107
|
+
width,
|
|
4108
|
+
visible,
|
|
4109
|
+
aggFunc,
|
|
4110
|
+
formatter,
|
|
4111
|
+
filterMultiple,
|
|
4112
|
+
cellRender,
|
|
4113
|
+
editRender,
|
|
4114
|
+
filterRender
|
|
4115
|
+
} = colConfs;
|
|
4116
|
+
const colId = colConfs.colId || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId('col_');
|
|
4117
|
+
const proxyOpts = $xeGrid ? $xeGrid.computeProxyOpts : null;
|
|
4118
|
+
const defaultVisible = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(visible) ? visible : true;
|
|
4119
|
+
const defaultRenderWidth = width && isPx(width) && width !== 'auto' ? Math.max(0, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(width)) : 0;
|
|
4120
|
+
const flCompConf = filterRender && isEnableConf(filterRender) ? columnInfo_renderer.get(filterRender.name) : null;
|
|
4121
|
+
const ctFilterOptions = flCompConf ? flCompConf.createTableFilterOptions : null;
|
|
4122
|
+
const filters = toFilters(colConfs.filters, colId);
|
|
4123
|
+
const types = ['seq', 'checkbox', 'radio', 'expand', 'html'];
|
|
4124
|
+
if (type && types.indexOf(type) === -1) {
|
|
4125
|
+
warnLog('vxe.error.errProp', [`type=${type}`, types.join(', ')]);
|
|
4126
|
+
}
|
|
4127
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(cellRender) || cellRender && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isObject(cellRender)) {
|
|
4128
|
+
warnLog('vxe.error.errProp', [`column.cell-render=${cellRender}`, 'column.cell-render={}']);
|
|
4129
|
+
}
|
|
4130
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(editRender) || editRender && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isObject(editRender)) {
|
|
4131
|
+
warnLog('vxe.error.errProp', [`column.edit-render=${editRender}`, 'column.edit-render={}']);
|
|
4132
|
+
}
|
|
4133
|
+
if (type === 'expand') {
|
|
4134
|
+
const {
|
|
4135
|
+
treeConfig
|
|
4136
|
+
} = tableProps;
|
|
4137
|
+
if (treeConfig && ($xeTable.treeOpts.showLine || $xeTable.treeOpts.line)) {
|
|
4138
|
+
errLog('vxe.error.errConflicts', ['tree-config.line', 'column.type=expand']);
|
|
4139
|
+
}
|
|
4140
|
+
}
|
|
4141
|
+
// 参数已废弃
|
|
4142
|
+
if (colConfs.remoteSort) {
|
|
4143
|
+
warnLog('vxe.error.delProp', ['column.remote-sort', 'sort-config.remote']);
|
|
4144
|
+
}
|
|
4145
|
+
// 参数已废弃
|
|
4146
|
+
if (colConfs.sortMethod) {
|
|
4147
|
+
warnLog('vxe.error.delProp', ['column.sort-method', 'sort-config.sortMethod']);
|
|
4148
|
+
}
|
|
4149
|
+
if (formatter) {
|
|
4150
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(formatter)) {
|
|
4151
|
+
const gFormatOpts = columnInfo_formats.get(formatter) || (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default())[formatter];
|
|
4152
|
+
if (!gFormatOpts || !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod)) {
|
|
4153
|
+
errLog('vxe.error.notFormats', [formatter]);
|
|
4154
|
+
}
|
|
4155
|
+
} else if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(formatter)) {
|
|
4156
|
+
const gFormatOpts = columnInfo_formats.get(formatter[0]) || (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default())[formatter[0]];
|
|
4157
|
+
if (!gFormatOpts || !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod)) {
|
|
4158
|
+
errLog('vxe.error.notFormats', [formatter[0]]);
|
|
4159
|
+
}
|
|
4160
|
+
}
|
|
4161
|
+
}
|
|
4162
|
+
if (aggFunc) {
|
|
4163
|
+
if (!$xeTable.handlePivotTableAggData && aggFunc !== true) {
|
|
4164
|
+
errLog('vxe.error.errProp', [`column.agg-func=${aggFunc}`, 'column.agg-func=true']);
|
|
4165
|
+
}
|
|
4166
|
+
}
|
|
4167
|
+
if (field && editRender) {
|
|
4168
|
+
if (editRender.startField && `${editRender.startField}`.indexOf(field) >= 0) {
|
|
4169
|
+
errLog('vxe.error.modelConflicts', [`field=${field}`, `edit-render.startField=${editRender.startField}`]);
|
|
4170
|
+
}
|
|
4171
|
+
if (editRender.endField && `${editRender.endField}`.indexOf(field) >= 0) {
|
|
4172
|
+
errLog('vxe.error.modelConflicts', [`field=${field}`, `edit-render.endField=${editRender.endField}`]);
|
|
4173
|
+
}
|
|
4174
|
+
}
|
|
4175
|
+
Object.assign(this, {
|
|
4176
|
+
// 基本属性
|
|
4177
|
+
type: colConfs.type,
|
|
4178
|
+
property: colConfs.field,
|
|
4179
|
+
field: field,
|
|
4180
|
+
title: colConfs.title,
|
|
4181
|
+
width: colConfs.width,
|
|
4182
|
+
minWidth: colConfs.minWidth,
|
|
4183
|
+
maxWidth: colConfs.maxWidth,
|
|
4184
|
+
resizable: colConfs.resizable,
|
|
4185
|
+
fixed: colConfs.fixed,
|
|
4186
|
+
align: colConfs.align,
|
|
4187
|
+
headerAlign: colConfs.headerAlign,
|
|
4188
|
+
footerAlign: colConfs.footerAlign,
|
|
4189
|
+
showOverflow: colConfs.showOverflow,
|
|
4190
|
+
showHeaderOverflow: colConfs.showHeaderOverflow,
|
|
4191
|
+
showFooterOverflow: colConfs.showFooterOverflow,
|
|
4192
|
+
className: colConfs.className,
|
|
4193
|
+
headerClassName: colConfs.headerClassName,
|
|
4194
|
+
footerClassName: colConfs.footerClassName,
|
|
4195
|
+
formatter,
|
|
4196
|
+
headerFormatter: colConfs.headerFormatter,
|
|
4197
|
+
footerFormatter: colConfs.footerFormatter,
|
|
4198
|
+
padding: colConfs.padding,
|
|
4199
|
+
verticalAlign: colConfs.verticalAlign,
|
|
4200
|
+
sortable: colConfs.sortable,
|
|
4201
|
+
sortBy: colConfs.sortBy,
|
|
4202
|
+
sortType: colConfs.sortType,
|
|
4203
|
+
// 参数已废弃
|
|
4204
|
+
sortMethod: colConfs.sortMethod,
|
|
4205
|
+
// 参数已废弃
|
|
4206
|
+
remoteSort: colConfs.remoteSort,
|
|
4207
|
+
filters: filters,
|
|
4208
|
+
filterMultiple: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(filterMultiple) ? filterMultiple : true,
|
|
4209
|
+
filterMethod: colConfs.filterMethod,
|
|
4210
|
+
filterResetMethod: colConfs.filterResetMethod,
|
|
4211
|
+
filterRecoverMethod: colConfs.filterRecoverMethod,
|
|
4212
|
+
filterRender: filterRender,
|
|
4213
|
+
floatingFilters: colConfs.floatingFilters,
|
|
4214
|
+
rules: colConfs.rules,
|
|
4215
|
+
rowGroupNode: colConfs.rowGroupNode,
|
|
4216
|
+
treeNode: colConfs.treeNode,
|
|
4217
|
+
dragSort: colConfs.dragSort,
|
|
4218
|
+
rowResize: colConfs.rowResize,
|
|
4219
|
+
cellType: colConfs.cellType,
|
|
4220
|
+
cellRender: colConfs.cellRender,
|
|
4221
|
+
editRender: editRender,
|
|
4222
|
+
contentRender: colConfs.contentRender,
|
|
4223
|
+
headerExportMethod: colConfs.headerExportMethod,
|
|
4224
|
+
exportMethod: colConfs.exportMethod,
|
|
4225
|
+
footerExportMethod: colConfs.footerExportMethod,
|
|
4226
|
+
titleHelp: colConfs.titleHelp,
|
|
4227
|
+
titlePrefix: colConfs.titlePrefix,
|
|
4228
|
+
titleSuffix: colConfs.titleSuffix,
|
|
4229
|
+
aggFunc: colConfs.aggFunc,
|
|
4230
|
+
copyMethod: colConfs.copyMethod,
|
|
4231
|
+
cutMethod: colConfs.cutMethod,
|
|
4232
|
+
pasteMethod: colConfs.pasteMethod,
|
|
4233
|
+
// 自定义参数
|
|
4234
|
+
params: colConfs.params,
|
|
4235
|
+
// 渲染属性
|
|
4236
|
+
id: colId,
|
|
4237
|
+
parentId: null,
|
|
4238
|
+
visible: defaultVisible,
|
|
4239
|
+
// 内部属性(一旦被使用,将导致不可升级版本)
|
|
4240
|
+
defaultParentId: null,
|
|
4241
|
+
halfVisible: false,
|
|
4242
|
+
defaultVisible: defaultVisible,
|
|
4243
|
+
defaultFixed: colConfs.fixed,
|
|
4244
|
+
defaultAggFunc: colConfs.aggFunc,
|
|
4245
|
+
checked: false,
|
|
4246
|
+
halfChecked: false,
|
|
4247
|
+
disabled: false,
|
|
4248
|
+
// 分组层级
|
|
4249
|
+
level: 1,
|
|
4250
|
+
// 跨行
|
|
4251
|
+
rowSpan: 1,
|
|
4252
|
+
// 跨列
|
|
4253
|
+
colSpan: 1,
|
|
4254
|
+
// 数据排序
|
|
4255
|
+
order: null,
|
|
4256
|
+
sortTime: 0,
|
|
4257
|
+
// 列排序
|
|
4258
|
+
sortNumber: 0,
|
|
4259
|
+
renderSortNumber: 0,
|
|
4260
|
+
renderAggFn: '',
|
|
4261
|
+
renderAggDigits: null,
|
|
4262
|
+
renderAggFormat: null,
|
|
4263
|
+
renderFixed: '',
|
|
4264
|
+
renderVisible: false,
|
|
4265
|
+
renderWidth: defaultRenderWidth,
|
|
4266
|
+
renderHeight: 0,
|
|
4267
|
+
renderResizeWidth: 0,
|
|
4268
|
+
renderAutoWidth: 0,
|
|
4269
|
+
resizeWidth: 0,
|
|
4270
|
+
renderLeft: 0,
|
|
4271
|
+
renderArgs: [],
|
|
4272
|
+
model: {},
|
|
4273
|
+
renderHeader: renderHeader || colConfs.renderHeader,
|
|
4274
|
+
renderCell: renderCell || colConfs.renderCell,
|
|
4275
|
+
renderFooter: renderFooter || colConfs.renderFooter,
|
|
4276
|
+
renderData,
|
|
4277
|
+
// 单元格插槽,只对 grid 有效
|
|
4278
|
+
slots: colConfs.slots
|
|
4279
|
+
});
|
|
4280
|
+
if (ctFilterOptions && (!filters || !filters.length)) {
|
|
4281
|
+
this.filters = toFilters(ctFilterOptions({
|
|
4282
|
+
$table: $xeTable,
|
|
4283
|
+
column: this
|
|
4284
|
+
}), colId);
|
|
4285
|
+
}
|
|
4286
|
+
if ($xeGGWrapper) {
|
|
4287
|
+
if (proxyOpts && proxyOpts.beforeColumn) {
|
|
4288
|
+
proxyOpts.beforeColumn({
|
|
4289
|
+
$table: $xeTable,
|
|
4290
|
+
$grid: $xeGrid,
|
|
4291
|
+
$gantt: $xeGantt,
|
|
4292
|
+
column: this
|
|
4293
|
+
});
|
|
4294
|
+
}
|
|
4295
|
+
}
|
|
4296
|
+
}
|
|
4297
|
+
getTitle() {
|
|
4298
|
+
return getFuncText(this.title || (this.type === 'seq' ? columnInfo_getI18n('vxe.table.seqTitle') : ''));
|
|
4299
|
+
}
|
|
4300
|
+
getKey() {
|
|
4301
|
+
const {
|
|
4302
|
+
type,
|
|
4303
|
+
field
|
|
4304
|
+
} = this;
|
|
4305
|
+
return field || (type ? `type=${type}` : null);
|
|
4306
|
+
}
|
|
4307
|
+
update(name, value) {
|
|
4308
|
+
// 不支持直接修改的属性
|
|
4309
|
+
if (name !== 'filters') {
|
|
4310
|
+
if (name === 'field') {
|
|
4311
|
+
// 兼容旧属性
|
|
4312
|
+
this.property = value;
|
|
4313
|
+
}
|
|
4314
|
+
this[name] = value;
|
|
4315
|
+
}
|
|
4316
|
+
}
|
|
4317
|
+
}
|
|
4306
4318
|
;// ./packages/table/src/util.ts
|
|
4307
4319
|
|
|
4308
4320
|
|
|
@@ -6655,10 +6667,12 @@ const Cell = {
|
|
|
6655
6667
|
isLazyLoading = !!rowExpandLazyLoadedMaps[rowid];
|
|
6656
6668
|
}
|
|
6657
6669
|
}
|
|
6658
|
-
return renderCellBaseVNs(h, params, [showIcon && (!visibleMethod || visibleMethod(params)) ? h('
|
|
6670
|
+
return renderCellBaseVNs(h, params, [showIcon && (!visibleMethod || visibleMethod(params)) ? h('div', {
|
|
6659
6671
|
class: ['vxe-table--expanded', {
|
|
6660
6672
|
'is--active': isActive
|
|
6661
|
-
}]
|
|
6673
|
+
}]
|
|
6674
|
+
}, [h('span', {
|
|
6675
|
+
class: 'vxe-table--expand-btn',
|
|
6662
6676
|
on: {
|
|
6663
6677
|
mousedown(evnt) {
|
|
6664
6678
|
evnt.stopPropagation();
|
|
@@ -6668,8 +6682,8 @@ const Cell = {
|
|
|
6668
6682
|
}
|
|
6669
6683
|
}
|
|
6670
6684
|
}, [h('i', {
|
|
6671
|
-
class:
|
|
6672
|
-
})]) : renderEmptyElement($table), defaultSlot || labelField ? h('span', {
|
|
6685
|
+
class: isLazyLoading ? iconLoaded || cell_getIcon().TABLE_EXPAND_LOADED : isActive ? iconOpen || cell_getIcon().TABLE_EXPAND_OPEN : iconClose || cell_getIcon().TABLE_EXPAND_CLOSE
|
|
6686
|
+
})])]) : renderEmptyElement($table), defaultSlot || labelField ? h('span', {
|
|
6673
6687
|
class: 'vxe-table--expand-label'
|
|
6674
6688
|
}, defaultSlot ? $table.callSlot(defaultSlot, params, h) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, labelField)) : renderEmptyElement($table)]);
|
|
6675
6689
|
},
|
|
@@ -7702,7 +7716,7 @@ if(isCustomSort&&sortData){allCols.forEach(column=>{const colKey=column.getKey()
|
|
|
7702
7716
|
// }
|
|
7703
7717
|
}if(htmlColumn){if(!columnOpts.useKey){errLog('vxe.error.notSupportProp',['column.type=html','column-config.useKey=false','column-config.useKey=true']);}if(!rowOpts.useKey){errLog('vxe.error.notSupportProp',['column.type=html','row-config.useKey=false','row-config.useKey=true']);}}reactData.isGroup=isGroup;reactData.rowGroupColumn=rowGroupColumn;reactData.treeNodeColumn=treeNodeColumn;reactData.expandColumn=expandColumn;reactData.checkboxColumn=checkboxColumn;reactData.radioColumn=radioColumn;reactData.isAllOverflow=isAllOverflow;}function updateScrollXStatus($xeTable,fullColumn){const reactData=$xeTable;const internalData=$xeTable;const virtualXOpts=$xeTable.computeVirtualXOpts;const allCols=fullColumn||internalData.tableFullColumn;// 如果gt为0,则总是启用
|
|
7704
7718
|
const scrollXLoad=!!virtualXOpts.enabled&&virtualXOpts.gt>-1&&(virtualXOpts.gt===0||virtualXOpts.gt<allCols.length);reactData.scrollXLoad=scrollXLoad;return scrollXLoad;}function syncGanttScrollYStatus($xeTable){const reactData=$xeTable;const internalData=$xeTable;const $xeGanttView=internalData.xeGanttView;if($xeGanttView&&$xeGanttView.handleUpdateSYStatus){$xeGanttView.handleUpdateSYStatus(reactData.scrollYLoad);}}function updateScrollYStatus($xeTable,fullData){const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{treeConfig}=props;const virtualYOpts=$xeTable.computeVirtualYOpts;const treeOpts=$xeTable.computeTreeOpts;const{transform}=treeOpts;const allList=fullData||internalData.tableFullData;// 如果gt为0,则总是启用
|
|
7705
|
-
|
|
7719
|
+
let scrollYLoad=!!virtualYOpts.enabled&&virtualYOpts.gt>-1&&(virtualYOpts.gt===0||virtualYOpts.gt<allList.length);if(scrollYLoad&&treeConfig&&!transform){errLog('vxe.error.notSupportProp',['[table] virtual-y-config.enabled=true','tree-config.transform=false','tree-config.transform=true']);scrollYLoad=false;}reactData.scrollYLoad=scrollYLoad;syncGanttScrollYStatus($xeTable);return scrollYLoad;}/**
|
|
7706
7720
|
* 展开与收起树节点
|
|
7707
7721
|
* @param rows
|
|
7708
7722
|
* @param expanded
|
|
@@ -7988,7 +8002,7 @@ if(virtualXOpts.scrollToLeftOnChange){targetScrollLeft=0;}if(virtualYOpts.scroll
|
|
|
7988
8002
|
* 更新数据行的 Map
|
|
7989
8003
|
*/cacheRowMap(isReset){const $xeTable=this;const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{treeConfig}=props;const{isRowGroupStatus}=reactData;const{currKeyField,fullAllDataRowIdData,tableFullData,tableFullTreeData,tableFullGroupData,treeExpandedMaps,rowExpandedMaps,selectCheckboxMaps}=internalData;const fullAllDataRowIdMaps=isReset?{}:{...fullAllDataRowIdData};// 存在已删除数据
|
|
7990
8004
|
const fullDataRowIdMaps={};const idMaps={};const{handleUpdateRowId}=createHandleUpdateRowId($xeTable);const handleRowCache=(row,index,items,currIndex,parentRow,rowid,level,seq)=>{let rowRest=fullAllDataRowIdMaps[rowid];if(idMaps[rowid]){errLog('vxe.error.repeatKey',[currKeyField,rowid]);}if(!rowRest){rowRest={row,rowid,seq,index:-1,_index:-1,$index:-1,treeIndex:index,_tIndex:-1,items,parent:parentRow,level,height:0,resizeHeight:0,oTop:0,expandHeight:0};}rowRest.treeLoaded=false;rowRest.expandLoaded=false;rowRest.row=row;rowRest.items=items;rowRest.parent=parentRow;rowRest.level=level;rowRest.index=currIndex;rowRest.treeIndex=index;// 更新缓存
|
|
7991
|
-
if(selectCheckboxMaps[rowid]){selectCheckboxMaps[rowid]=row;}if(rowExpandedMaps[rowid]){rowExpandedMaps[rowid]=row;}idMaps[rowid]=true;fullDataRowIdMaps[rowid]=rowRest;fullAllDataRowIdMaps[rowid]=rowRest;};if(treeConfig){const treeOpts=$xeTable.computeTreeOpts;const{lazy}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const hasChildField=treeOpts.hasChild||treeOpts.hasChildField;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData,(row,index,items,path,parentRow,nodes)=>{const rowid=handleUpdateRowId(row);if(
|
|
8005
|
+
if(selectCheckboxMaps[rowid]){selectCheckboxMaps[rowid]=row;}if(rowExpandedMaps[rowid]){rowExpandedMaps[rowid]=row;}idMaps[rowid]=true;fullDataRowIdMaps[rowid]=rowRest;fullAllDataRowIdMaps[rowid]=rowRest;};if(treeConfig){const treeOpts=$xeTable.computeTreeOpts;const{lazy}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const hasChildField=treeOpts.hasChild||treeOpts.hasChildField;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData,(row,index,items,path,parentRow,nodes)=>{const rowid=handleUpdateRowId(row);if(lazy){if(row[hasChildField]&&row[childrenField]===undefined){row[childrenField]=null;}if(treeExpandedMaps[rowid]){if(!row[childrenField]||!row[childrenField].length){delete treeExpandedMaps[rowid];}}}handleRowCache(row,index,items,parentRow?-1:index,parentRow,rowid,nodes.length-1,toTreePathSeq(path));},{children:childrenField});}else if(isRowGroupStatus){const aggregateOpts=$xeTable.computeAggregateOpts;const{mapChildrenField}=aggregateOpts;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullGroupData,(row,index,items,path,parentRow,nodes)=>{const rowid=handleUpdateRowId(row);handleRowCache(row,index,items,parentRow?-1:index,parentRow,rowid,nodes.length-1,toTreePathSeq(path));},{children:mapChildrenField});}else{tableFullData.forEach((row,index,items)=>{handleRowCache(row,index,items,index,null,handleUpdateRowId(row),0,index+1);});}internalData.fullDataRowIdData=fullDataRowIdMaps;internalData.fullAllDataRowIdData=fullAllDataRowIdMaps;reactData.treeExpandedFlag++;},cacheSourceMap(fullData){const $xeTable=this;const props=$xeTable;const internalData=$xeTable;const{treeConfig}=props;const treeOpts=$xeTable.computeTreeOpts;const sourceData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(fullData,true);const{handleUpdateRowId}=createHandleUpdateRowId($xeTable);const sourceRowIdData={};const handleSourceRow=row=>{const rowid=handleUpdateRowId(row);sourceRowIdData[rowid]=row;};// 源数据缓存
|
|
7992
8006
|
if(treeConfig){const childrenField=treeOpts.children||treeOpts.childrenField;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(sourceData,handleSourceRow,{children:treeOpts.transform?treeOpts.mapChildrenField:childrenField});}else{sourceData.forEach(handleSourceRow);}internalData.sourceDataRowIdData=sourceRowIdData;internalData.tableSourceData=sourceData;},getParams(){const $xeTable=this;const props=$xeTable;return props.params;},loadTreeChildren(row,childRecords){const $xeTable=this;const props=$xeTable;const internalData=$xeTable;const{keepSource}=props;const{tableSourceData,fullDataRowIdData,fullAllDataRowIdData,sourceDataRowIdData}=internalData;const treeOpts=$xeTable.computeTreeOpts;const{transform,mapChildrenField}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const parentRest=fullAllDataRowIdData[getRowid($xeTable,row)];const parentLevel=parentRest?parentRest.level:0;return this.createData(childRecords).then(rows=>{if(keepSource){const rowid=getRowid(this,row);const matchObj=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(tableSourceData,item=>rowid===getRowid(this,item),{children:childrenField});if(matchObj){matchObj.item[childrenField]=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(rows,true);}rows.forEach(childRow=>{const rowid=getRowid(this,childRow);sourceDataRowIdData[rowid]=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(childRow,true);});}external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(rows,(childRow,index,items,path,parentItem,nodes)=>{const rowid=getRowid($xeTable,childRow);const parentRow=parentItem||parentRest.row;const rest={row:childRow,rowid,seq:-1,index,_index:-1,$index:-1,treeIndex:-1,_tIndex:-1,items,parent:parentRow,level:parentLevel+nodes.length,height:0,resizeHeight:0,oTop:0,expandHeight:0};fullDataRowIdData[rowid]=rest;fullAllDataRowIdData[rowid]=rest;},{children:childrenField});row[childrenField]=rows;if(transform){row[mapChildrenField]=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(rows,false);}updateAfterDataIndex($xeTable);return rows;});},/**
|
|
7993
8007
|
* 根据 tr 元素获取对应的 row 信息
|
|
7994
8008
|
* @param {Element} tr 元素
|
|
@@ -13525,12 +13539,12 @@ const {
|
|
|
13525
13539
|
} = tableReactData;
|
|
13526
13540
|
const menuOpts = $xeTable.computeMenuOpts;
|
|
13527
13541
|
const {
|
|
13528
|
-
destroyOnClose
|
|
13542
|
+
destroyOnClose,
|
|
13543
|
+
className
|
|
13529
13544
|
} = menuOpts;
|
|
13530
13545
|
const {
|
|
13531
13546
|
visible,
|
|
13532
|
-
list
|
|
13533
|
-
className
|
|
13547
|
+
list
|
|
13534
13548
|
} = ctxMenuStore;
|
|
13535
13549
|
return h('div', {
|
|
13536
13550
|
ref: 'refElem',
|
|
@@ -13540,7 +13554,7 @@ const {
|
|
|
13540
13554
|
style: ctxMenuStore.style
|
|
13541
13555
|
}, (destroyOnClose ? visible : true) ? list.map((options, gIndex) => {
|
|
13542
13556
|
return options.every(item => item.visible === false) ? menu_panel_renderEmptyElement($xeTable) : h('ul', {
|
|
13543
|
-
class: 'vxe-context-menu
|
|
13557
|
+
class: 'vxe-table--context-menu-group-wrapper',
|
|
13544
13558
|
key: gIndex
|
|
13545
13559
|
}, options.map((item, index) => {
|
|
13546
13560
|
const {
|
|
@@ -13554,7 +13568,7 @@ const {
|
|
|
13554
13568
|
const suffixIcon = suffixOpts.icon || item.suffixIcon;
|
|
13555
13569
|
const menuContent = getFuncText(item.name);
|
|
13556
13570
|
return item.visible === false ? menu_panel_renderEmptyElement($xeTable) : h('li', {
|
|
13557
|
-
class: [item.className, {
|
|
13571
|
+
class: ['vxe-table--context-menu--option', item.className, {
|
|
13558
13572
|
'link--loading': loading,
|
|
13559
13573
|
'link--disabled': item.disabled,
|
|
13560
13574
|
'link--active': item === ctxMenuStore.selected
|
|
@@ -13588,11 +13602,11 @@ const {
|
|
|
13588
13602
|
class: ['vxe-context-menu--link-suffix', suffixOpts.className || '']
|
|
13589
13603
|
}, [suffixIcon && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(suffixIcon) ? h('span', {}, getSlotVNs(suffixIcon.call($xeTable, {}))) : h('i', {
|
|
13590
13604
|
class: suffixIcon || (hasChildMenus ? menu_panel_getIcon().TABLE_MENU_OPTIONS : '')
|
|
13591
|
-
}), suffixOpts.content ? h('span', `${suffixOpts.content}`) : menu_panel_renderEmptyElement($xeTable)])]), hasChildMenus &&
|
|
13605
|
+
}), suffixOpts.content ? h('span', `${suffixOpts.content}`) : menu_panel_renderEmptyElement($xeTable)])]), hasChildMenus && children ? h('ul', {
|
|
13592
13606
|
class: ['vxe-table--context-menu-clild-wrapper', {
|
|
13593
13607
|
'is--show': item === ctxMenuStore.selected && ctxMenuStore.showChild
|
|
13594
13608
|
}]
|
|
13595
|
-
},
|
|
13609
|
+
}, children.map((child, cIndex) => {
|
|
13596
13610
|
const {
|
|
13597
13611
|
loading: childLoading
|
|
13598
13612
|
} = child;
|
|
@@ -13602,7 +13616,7 @@ const {
|
|
|
13602
13616
|
const childSuffixIcon = childSuffixOpts.icon || child.suffixIcon;
|
|
13603
13617
|
const childMenuContent = getFuncText(child.name);
|
|
13604
13618
|
return child.visible === false ? null : h('li', {
|
|
13605
|
-
class: [child.className, {
|
|
13619
|
+
class: ['vxe-table--context-menu--option', child.className, {
|
|
13606
13620
|
'link--loading': childLoading,
|
|
13607
13621
|
'link--disabled': child.disabled,
|
|
13608
13622
|
'link--active': child === ctxMenuStore.selectChild
|
|
@@ -21854,7 +21868,7 @@ function renderBody(h, $xeTable) {
|
|
|
21854
21868
|
warnLog('vxe.error.delProp', ['table.edit-config.activeMethod', 'table.edit-config.beforeEditMethod']);
|
|
21855
21869
|
}
|
|
21856
21870
|
if (props.treeConfig && checkboxOpts.isShiftKey) {
|
|
21857
|
-
errLog('vxe.error.
|
|
21871
|
+
errLog('vxe.error.reqSupportProp', ['tree-config', 'checkbox-config.isShiftKey=false']);
|
|
21858
21872
|
}
|
|
21859
21873
|
if (checkboxOpts.halfField) {
|
|
21860
21874
|
warnLog('vxe.error.delProp', ['checkbox-config.halfField', 'checkbox-config.indeterminateField']);
|