vxe-table 3.21.10 → 3.21.12
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/grid/src/grid.js +11 -3
- 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 +2 -2
- package/es/table/src/cell.js +17 -13
- package/es/table/src/columnInfo.js +85 -81
- package/es/table/src/methods.js +3 -3
- package/es/table/style.css +18 -6
- 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 +18 -6
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +9 -3
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +269 -246
- 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 +3 -3
- 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 +4 -1
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/style/style.css +18 -6
- 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 +18 -6
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +9 -3
- package/packages/table/module/menu/panel.ts +2 -2
- package/packages/table/src/cell.ts +17 -13
- package/packages/table/src/columnInfo.ts +90 -84
- package/packages/table/src/methods.ts +3 -3
- package/packages/table/src/util.ts +1 -1
- package/styles/components/table.scss +24 -6
- /package/es/{iconfont.1780911698543.ttf → iconfont.1781140842818.ttf} +0 -0
- /package/es/{iconfont.1780911698543.woff → iconfont.1781140842818.woff} +0 -0
- /package/es/{iconfont.1780911698543.woff2 → iconfont.1781140842818.woff2} +0 -0
- /package/lib/{iconfont.1780911698543.ttf → iconfont.1781140842818.ttf} +0 -0
- /package/lib/{iconfont.1780911698543.woff → iconfont.1781140842818.woff} +0 -0
- /package/lib/{iconfont.1780911698543.woff2 → iconfont.1781140842818.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.12";
|
|
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.10"}`;
|
|
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.12"}`;
|
|
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
|
},
|
|
@@ -7697,7 +7711,10 @@ if(isCustomSort&&sortData){allCols.forEach(column=>{const colKey=column.getKey()
|
|
|
7697
7711
|
*/function restoreCustomStorage($xeTable){const props=$xeTable;const{customConfig}=props;const tableId=$xeTable.computeTableId;const customOpts=$xeTable.computeCustomOpts;const{storage,restoreStore,storeOptions}=customOpts;const isAllCustom=storage===true;const storageOpts=Object.assign({},isAllCustom?{}:storage||{},storeOptions);const isCustomResizable=hangleStorageDefaultValue(storageOpts.resizable,isAllCustom);const isCustomVisible=hangleStorageDefaultValue(storageOpts.visible,isAllCustom);const isCustomFixed=hangleStorageDefaultValue(storageOpts.fixed,isAllCustom);const isCustomSort=hangleStorageDefaultValue(storageOpts.sort,isAllCustom);const isCustomAggFunc=hangleStorageDefaultValue(storageOpts.aggFunc,isAllCustom);if(storage&&(customConfig?isEnableConf(customOpts):customOpts.enabled)&&(isCustomResizable||isCustomVisible||isCustomFixed||isCustomSort||isCustomAggFunc)){if(!tableId){errLog('vxe.error.reqProp',['id']);return;}const storeData=getCustomStorageMap(tableId);if(restoreStore){return Promise.resolve(restoreStore({$table:$xeTable,id:tableId,type:'restore',storeData})).then(storeData=>{if(!storeData){return;}return handleCustomRestore($xeTable,storeData);}).catch(e=>e);}else{return handleCustomRestore($xeTable,storeData);}}}/**
|
|
7698
7712
|
* 更新数据列的 Map
|
|
7699
7713
|
* 牺牲数据组装的耗时,用来换取使用过程中的流畅
|
|
7700
|
-
*/function cacheColumnMap($xeTable){const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{treeConfig,showOverflow}=props;const{tableFullColumn,collectColumn}=internalData;const fullColIdData=internalData.fullColumnIdData={};const fullColFieldData=internalData.fullColumnFieldData={};const mouseOpts=$xeTable.computeMouseOpts;const expandOpts=$xeTable.computeExpandOpts;const columnOpts=$xeTable.computeColumnOpts;const columnDragOpts=$xeTable.computeColumnDragOpts;const virtualYOpts=$xeTable.computeVirtualYOpts;const{isCrossDrag,isSelfToChildDrag}=columnDragOpts;const customOpts=$xeTable.computeCustomOpts;const treeOpts=$xeTable.computeTreeOpts;const{storage}=customOpts;const rowOpts=$xeTable.computeRowOpts;const isGroup=collectColumn.some(hasChildrenList);let isAllOverflow=!!showOverflow;let rowGroupColumn;let expandColumn;let treeNodeColumn;let checkboxColumn;let radioColumn;let htmlColumn;let hasFixed;const handleFunc=(column,index,items,path,parentColumn)=>{const{id:colid,field,fixed,type,treeNode,rowGroupNode}=column;const rest={$index:-1,_index:-1,column,colid,index,items,parent:parentColumn||null,width:0,oLeft:0};if(field){if(fullColFieldData[field]){errLog('vxe.error.colRepet',['field',field]);}fullColFieldData[field]=rest;}else{if(storage&&!type){errLog('vxe.error.reqSupportProp',['storage',`[${type?`type=${type}`:`title=${column.getTitle()}`}]field=?`]);}if(columnOpts.drag&&(isCrossDrag||isSelfToChildDrag)){errLog('vxe.error.reqSupportProp',['column-drag-config.isCrossDrag | column-drag-config.isSelfToChildDrag',`${column.getTitle()||type||''} -> field=?`]);}}if(!hasFixed&&fixed){hasFixed=fixed;}if(!htmlColumn&&type==='html'){htmlColumn=column;}if(treeNode){if(treeNodeColumn){warnLog('vxe.error.colRepet',['tree-node',treeNode]);}if(!treeNodeColumn){treeNodeColumn=column;}}if(rowGroupNode){if(treeNodeColumn){warnLog('vxe.error.colRepet',['row-group-node',rowGroupNode]);}if(!rowGroupColumn){rowGroupColumn=column;}}if(type==='expand'){if(expandColumn){warnLog('vxe.error.colRepet',['type',type]);}if(!expandColumn){expandColumn=column;}}if(type==='checkbox'){if(checkboxColumn){warnLog('vxe.error.colRepet',['type',type]);}if(!checkboxColumn){checkboxColumn=column;}}else if(type==='radio'){if(radioColumn){warnLog('vxe.error.colRepet',['type',type]);}if(!radioColumn){radioColumn=column;}}if(isAllOverflow&&column.showOverflow===false){isAllOverflow=false;}if(fullColIdData[colid]){errLog('vxe.error.colRepet',['colId',colid]);}fullColIdData[colid]=rest;};if(isGroup){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn,(column,index,items,path,parentColumn,nodes)=>{column.level=nodes.length;handleFunc(column,index,items,path,parentColumn);});}else{tableFullColumn.forEach(handleFunc);}if(expandColumn){if(expandOpts.mode!=='fixed'&&virtualYOpts.enabled){warnLog('vxe.error.notConflictProp',['column.type="expand','virtual-y-config.enabled=false']);}if(expandOpts.mode!=='fixed'&&mouseOpts.area){errLog('vxe.error.errConflicts',['mouse-config.area','column.type=expand']);}if(expandOpts.mode!=='inside'&&treeConfig&&!treeOpts.transform){errLog('vxe.error.notConflictProp',['tree-config.transform=false','expand-config.mode=inside']);}if(props.spanMethod)
|
|
7714
|
+
*/function cacheColumnMap($xeTable){const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{treeConfig,showOverflow}=props;const{tableFullColumn,collectColumn}=internalData;const fullColIdData=internalData.fullColumnIdData={};const fullColFieldData=internalData.fullColumnFieldData={};const mouseOpts=$xeTable.computeMouseOpts;const expandOpts=$xeTable.computeExpandOpts;const columnOpts=$xeTable.computeColumnOpts;const columnDragOpts=$xeTable.computeColumnDragOpts;const virtualYOpts=$xeTable.computeVirtualYOpts;const{isCrossDrag,isSelfToChildDrag}=columnDragOpts;const customOpts=$xeTable.computeCustomOpts;const treeOpts=$xeTable.computeTreeOpts;const{storage}=customOpts;const rowOpts=$xeTable.computeRowOpts;const isGroup=collectColumn.some(hasChildrenList);let isAllOverflow=!!showOverflow;let rowGroupColumn;let expandColumn;let treeNodeColumn;let checkboxColumn;let radioColumn;let htmlColumn;let hasFixed;const handleFunc=(column,index,items,path,parentColumn)=>{const{id:colid,field,fixed,type,treeNode,rowGroupNode}=column;const rest={$index:-1,_index:-1,column,colid,index,items,parent:parentColumn||null,width:0,oLeft:0};if(field){if(fullColFieldData[field]){errLog('vxe.error.colRepet',['field',field]);}fullColFieldData[field]=rest;}else{if(storage&&!type){errLog('vxe.error.reqSupportProp',['storage',`[${type?`type=${type}`:`title=${column.getTitle()}`}]field=?`]);}if(columnOpts.drag&&(isCrossDrag||isSelfToChildDrag)){errLog('vxe.error.reqSupportProp',['column-drag-config.isCrossDrag | column-drag-config.isSelfToChildDrag',`${column.getTitle()||type||''} -> field=?`]);}}if(!hasFixed&&fixed){hasFixed=fixed;}if(!htmlColumn&&type==='html'){htmlColumn=column;}if(treeNode){if(treeNodeColumn){warnLog('vxe.error.colRepet',['tree-node',treeNode]);}if(!treeNodeColumn){treeNodeColumn=column;}}if(rowGroupNode){if(treeNodeColumn){warnLog('vxe.error.colRepet',['row-group-node',rowGroupNode]);}if(!rowGroupColumn){rowGroupColumn=column;}}if(type==='expand'){if(expandColumn){warnLog('vxe.error.colRepet',['type',type]);}if(!expandColumn){expandColumn=column;}}if(type==='checkbox'){if(checkboxColumn){warnLog('vxe.error.colRepet',['type',type]);}if(!checkboxColumn){checkboxColumn=column;}}else if(type==='radio'){if(radioColumn){warnLog('vxe.error.colRepet',['type',type]);}if(!radioColumn){radioColumn=column;}}if(isAllOverflow&&column.showOverflow===false){isAllOverflow=false;}if(fullColIdData[colid]){errLog('vxe.error.colRepet',['colId',colid]);}fullColIdData[colid]=rest;};if(isGroup){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn,(column,index,items,path,parentColumn,nodes)=>{column.level=nodes.length;handleFunc(column,index,items,path,parentColumn);});}else{tableFullColumn.forEach(handleFunc);}if(expandColumn){if(expandOpts.mode!=='fixed'&&virtualYOpts.enabled){warnLog('vxe.error.notConflictProp',['column.type="expand','virtual-y-config.enabled=false']);}if(expandOpts.mode!=='fixed'&&mouseOpts.area){errLog('vxe.error.errConflicts',['mouse-config.area','column.type=expand']);}if(expandOpts.mode!=='inside'&&treeConfig&&!treeOpts.transform){errLog('vxe.error.notConflictProp',['tree-config.transform=false','expand-config.mode=inside']);}// if (props.spanMethod) {
|
|
7715
|
+
// warnLog('vxe.error.notSupportProp', ['column.type=expand', 'span-method', 'span-method=null'])
|
|
7716
|
+
// }
|
|
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,则总是启用
|
|
7701
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,则总是启用
|
|
7702
7719
|
const scrollYLoad=(transform||!treeConfig)&&!!virtualYOpts.enabled&&virtualYOpts.gt>-1&&(virtualYOpts.gt===0||virtualYOpts.gt<allList.length);reactData.scrollYLoad=scrollYLoad;syncGanttScrollYStatus($xeTable);return scrollYLoad;}/**
|
|
7703
7720
|
* 展开与收起树节点
|
|
@@ -13522,12 +13539,12 @@ const {
|
|
|
13522
13539
|
} = tableReactData;
|
|
13523
13540
|
const menuOpts = $xeTable.computeMenuOpts;
|
|
13524
13541
|
const {
|
|
13525
|
-
destroyOnClose
|
|
13542
|
+
destroyOnClose,
|
|
13543
|
+
className
|
|
13526
13544
|
} = menuOpts;
|
|
13527
13545
|
const {
|
|
13528
13546
|
visible,
|
|
13529
|
-
list
|
|
13530
|
-
className
|
|
13547
|
+
list
|
|
13531
13548
|
} = ctxMenuStore;
|
|
13532
13549
|
return h('div', {
|
|
13533
13550
|
ref: 'refElem',
|
|
@@ -24889,6 +24906,7 @@ function grid_createInternalData() {
|
|
|
24889
24906
|
return;
|
|
24890
24907
|
}
|
|
24891
24908
|
if (proxyConfig && isEnableConf(proxyOpts)) {
|
|
24909
|
+
$xeGrid.dispatchEvent('form-submit', params, params.$event);
|
|
24892
24910
|
internalData.uFoot = true;
|
|
24893
24911
|
$xeGrid.commitProxy('reload').then(rest => {
|
|
24894
24912
|
$xeGrid.dispatchEvent('proxy-query', {
|
|
@@ -24898,8 +24916,9 @@ function grid_createInternalData() {
|
|
|
24898
24916
|
});
|
|
24899
24917
|
internalData.uFoot = false;
|
|
24900
24918
|
$xeGrid.updateQueryFooter();
|
|
24919
|
+
} else {
|
|
24920
|
+
$xeGrid.dispatchEvent('form-submit', params, params.$event);
|
|
24901
24921
|
}
|
|
24902
|
-
$xeGrid.dispatchEvent('form-submit', params, params.$event);
|
|
24903
24922
|
},
|
|
24904
24923
|
resetFormEvent(params) {
|
|
24905
24924
|
const $xeGrid = this;
|
|
@@ -24914,7 +24933,10 @@ function grid_createInternalData() {
|
|
|
24914
24933
|
} = params;
|
|
24915
24934
|
const proxyOpts = $xeGrid.computeProxyOpts;
|
|
24916
24935
|
if (proxyConfig && isEnableConf(proxyOpts)) {
|
|
24917
|
-
$
|
|
24936
|
+
$xeGrid.dispatchEvent('form-reset', params, $event);
|
|
24937
|
+
if ($xeTable) {
|
|
24938
|
+
$xeTable.clearScroll();
|
|
24939
|
+
}
|
|
24918
24940
|
internalData.uFoot = true;
|
|
24919
24941
|
$xeGrid.commitProxy('reload').then(rest => {
|
|
24920
24942
|
$xeGrid.dispatchEvent('proxy-query', {
|
|
@@ -24924,8 +24946,9 @@ function grid_createInternalData() {
|
|
|
24924
24946
|
});
|
|
24925
24947
|
internalData.uFoot = false;
|
|
24926
24948
|
$xeGrid.updateQueryFooter();
|
|
24949
|
+
} else {
|
|
24950
|
+
$xeGrid.dispatchEvent('form-reset', params, $event);
|
|
24927
24951
|
}
|
|
24928
|
-
$xeGrid.dispatchEvent('form-reset', params, $event);
|
|
24929
24952
|
},
|
|
24930
24953
|
submitInvalidEvent(params) {
|
|
24931
24954
|
const $xeGrid = this;
|