vxe-table 4.12.0-beta.27 → 4.12.0-beta.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/style.css +1 -1
- package/es/table/module/custom/hook.js +1 -1
- package/es/table/module/custom/panel.js +4 -2
- package/es/table/module/edit/hook.js +3 -2
- package/es/table/module/export/export-panel.js +3 -2
- package/es/table/module/export/import-panel.js +3 -2
- package/es/table/module/menu/hook.js +2 -1
- package/es/table/module/validator/hook.js +2 -1
- package/es/table/src/body.js +10 -7
- package/es/table/src/columnInfo.js +2 -2
- package/es/table/src/footer.js +6 -4
- package/es/table/src/header.js +6 -4
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +44 -29
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/hook.js +1 -1
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +4 -2
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +3 -2
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/export-panel.js +3 -2
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +3 -2
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/menu/hook.js +2 -1
- package/lib/table/module/menu/hook.min.js +1 -1
- package/lib/table/module/validator/hook.js +2 -1
- package/lib/table/module/validator/hook.min.js +1 -1
- package/lib/table/src/body.js +10 -6
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/columnInfo.js +2 -4
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +6 -3
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +6 -3
- package/lib/table/src/header.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/table/module/custom/hook.ts +1 -1
- package/packages/table/module/custom/panel.ts +6 -2
- package/packages/table/module/edit/hook.ts +4 -2
- package/packages/table/module/export/export-panel.ts +4 -2
- package/packages/table/module/export/import-panel.ts +4 -2
- package/packages/table/module/menu/hook.ts +3 -1
- package/packages/table/module/validator/hook.ts +3 -1
- package/packages/table/src/body.ts +11 -7
- package/packages/table/src/columnInfo.ts +3 -2
- package/packages/table/src/footer.ts +7 -4
- package/packages/table/src/header.ts +7 -4
- package/packages/table/src/util.ts +1 -0
- /package/es/{iconfont.1742803078098.ttf → iconfont.1742890827584.ttf} +0 -0
- /package/es/{iconfont.1742803078098.woff → iconfont.1742890827584.woff} +0 -0
- /package/es/{iconfont.1742803078098.woff2 → iconfont.1742890827584.woff2} +0 -0
- /package/lib/{iconfont.1742803078098.ttf → iconfont.1742890827584.ttf} +0 -0
- /package/lib/{iconfont.1742803078098.woff → iconfont.1742890827584.woff} +0 -0
- /package/lib/{iconfont.1742803078098.woff2 → iconfont.1742890827584.woff2} +0 -0
|
@@ -320,6 +320,7 @@ hooks.add('tableEditModule', {
|
|
|
320
320
|
return nextTick().then(() => $xeTable.updateCellAreas());
|
|
321
321
|
};
|
|
322
322
|
const handleEditActive = (params, evnt, isFocus, isPos) => {
|
|
323
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
323
324
|
const { editConfig, mouseConfig } = props;
|
|
324
325
|
const { editStore, tableColumn } = reactData;
|
|
325
326
|
const editOpts = computeEditOpts.value;
|
|
@@ -336,7 +337,7 @@ hooks.add('tableEditModule', {
|
|
|
336
337
|
if (actived.row !== row || (mode === 'cell' ? actived.column !== column : false)) {
|
|
337
338
|
// 判断是否禁用编辑
|
|
338
339
|
let type = 'edit-disabled';
|
|
339
|
-
if (!beforeEditMethod || beforeEditMethod(Object.assign(Object.assign({}, params), { $table: $xeTable, $grid: $
|
|
340
|
+
if (!beforeEditMethod || beforeEditMethod(Object.assign(Object.assign({}, params), { $table: $xeTable, $grid: $xeGrid }))) {
|
|
340
341
|
if (mouseConfig) {
|
|
341
342
|
$xeTable.clearSelected();
|
|
342
343
|
if ($xeTable.clearCellAreas) {
|
|
@@ -365,7 +366,7 @@ hooks.add('tableEditModule', {
|
|
|
365
366
|
$xeTable.handleFocus(params, evnt);
|
|
366
367
|
}
|
|
367
368
|
if (afterEditMethod) {
|
|
368
|
-
afterEditMethod(Object.assign(Object.assign({}, params), { $table: $xeTable, $grid: $
|
|
369
|
+
afterEditMethod(Object.assign(Object.assign({}, params), { $table: $xeTable, $grid: $xeGrid }));
|
|
369
370
|
}
|
|
370
371
|
});
|
|
371
372
|
}
|
|
@@ -139,6 +139,7 @@ export default defineComponent({
|
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
141
|
const renderVN = () => {
|
|
142
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
142
143
|
const { defaultOptions, storeData } = props;
|
|
143
144
|
const { isAll: isAllChecked, isIndeterminate: isAllIndeterminate } = reactData;
|
|
144
145
|
const { hasTree, hasMerge, isPrint, hasColgroup, columns } = storeData;
|
|
@@ -216,7 +217,7 @@ export default defineComponent({
|
|
|
216
217
|
default: () => {
|
|
217
218
|
const params = {
|
|
218
219
|
$table: $xeTable,
|
|
219
|
-
$grid: $
|
|
220
|
+
$grid: $xeGrid,
|
|
220
221
|
options: defaultOptions,
|
|
221
222
|
columns,
|
|
222
223
|
params: defaultOptions.params
|
|
@@ -460,7 +461,7 @@ export default defineComponent({
|
|
|
460
461
|
footer() {
|
|
461
462
|
const params = {
|
|
462
463
|
$table: $xeTable,
|
|
463
|
-
$grid: $
|
|
464
|
+
$grid: $xeGrid,
|
|
464
465
|
options: defaultOptions,
|
|
465
466
|
columns,
|
|
466
467
|
params: defaultOptions.params
|
|
@@ -76,6 +76,7 @@ export default defineComponent({
|
|
|
76
76
|
});
|
|
77
77
|
};
|
|
78
78
|
const renderVN = () => {
|
|
79
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
79
80
|
const { defaultOptions, storeData } = props;
|
|
80
81
|
const selectName = computeSelectName.value;
|
|
81
82
|
const hasFile = computeHasFile.value;
|
|
@@ -110,7 +111,7 @@ export default defineComponent({
|
|
|
110
111
|
default: () => {
|
|
111
112
|
const params = {
|
|
112
113
|
$table: $xeTable,
|
|
113
|
-
$grid: $
|
|
114
|
+
$grid: $xeGrid,
|
|
114
115
|
options: defaultOptions,
|
|
115
116
|
params: defaultOptions.params
|
|
116
117
|
};
|
|
@@ -186,7 +187,7 @@ export default defineComponent({
|
|
|
186
187
|
footer() {
|
|
187
188
|
const params = {
|
|
188
189
|
$table: $xeTable,
|
|
189
|
-
$grid: $
|
|
190
|
+
$grid: $xeGrid,
|
|
190
191
|
options: defaultOptions,
|
|
191
192
|
params: defaultOptions.params
|
|
192
193
|
};
|
|
@@ -280,10 +280,11 @@ hooks.add('tableMenuModule', {
|
|
|
280
280
|
* 快捷菜单点击事件
|
|
281
281
|
*/
|
|
282
282
|
ctxMenuLinkEvent(evnt, menu) {
|
|
283
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
283
284
|
// 如果一级菜单有配置 code 则允许点击,否则不能点击
|
|
284
285
|
if (!menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
|
|
285
286
|
const gMenuOpts = menus.get(menu.code);
|
|
286
|
-
const params = Object.assign({}, internalData._currMenuParams, { menu, $table: $xeTable, $grid: $
|
|
287
|
+
const params = Object.assign({}, internalData._currMenuParams, { menu, $table: $xeTable, $grid: $xeGrid, $event: evnt });
|
|
287
288
|
const tmMethod = gMenuOpts ? (gMenuOpts.tableMenuMethod || gMenuOpts.menuMethod) : null;
|
|
288
289
|
if (tmMethod) {
|
|
289
290
|
tmMethod(params, evnt);
|
|
@@ -353,6 +353,7 @@ hooks.add('tableValidatorModule', {
|
|
|
353
353
|
* trigger=blur|change 触发方式(除非特殊场景,否则默认为空就行)
|
|
354
354
|
*/
|
|
355
355
|
validCellRules(validType, row, column, val) {
|
|
356
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
356
357
|
const { editRules } = props;
|
|
357
358
|
const { field } = column;
|
|
358
359
|
const errorRules = [];
|
|
@@ -375,7 +376,7 @@ hooks.add('tableValidatorModule', {
|
|
|
375
376
|
columnIndex: $xeTable.getColumnIndex(column),
|
|
376
377
|
field: column.field,
|
|
377
378
|
$table: $xeTable,
|
|
378
|
-
$grid: $
|
|
379
|
+
$grid: $xeGrid
|
|
379
380
|
};
|
|
380
381
|
let customValid;
|
|
381
382
|
if (XEUtils.isString(validator)) {
|
package/es/table/src/body.js
CHANGED
|
@@ -77,7 +77,8 @@ export default defineComponent({
|
|
|
77
77
|
* 渲染列
|
|
78
78
|
*/
|
|
79
79
|
const renderTdColumn = (seq, rowid, fixedType, isOptimizeMode, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, columns, items) => {
|
|
80
|
-
const
|
|
80
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
81
|
+
const { fullAllDataRowIdData, fullColumnIdData, visibleColumn } = tableInternalData;
|
|
81
82
|
const { columnKey, resizable: allResizable, showOverflow: allShowOverflow, border, height, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding: allPadding } = tableProps;
|
|
82
83
|
const { tableData, dragRow, overflowX, currentColumn, scrollXLoad, scrollYLoad, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag, mergeList, editStore, isAllOverflow, validErrorMaps } = tableReactData;
|
|
83
84
|
const { afterFullData, scrollXStore, scrollYStore } = tableInternalData;
|
|
@@ -101,15 +102,16 @@ export default defineComponent({
|
|
|
101
102
|
const { type, cellRender, editRender, align, showOverflow, className, treeNode, rowResize, padding, verticalAlign, slots } = column;
|
|
102
103
|
const { verticalAlign: allVerticalAlign } = cellOpts;
|
|
103
104
|
const { actived } = editStore;
|
|
104
|
-
const rowRest = fullAllDataRowIdData[rowid];
|
|
105
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
105
106
|
const colid = column.id;
|
|
107
|
+
const colRest = fullColumnIdData[colid] || {};
|
|
106
108
|
const renderOpts = editRender || cellRender;
|
|
107
109
|
const compConf = renderOpts ? renderer.get(renderOpts.name) : null;
|
|
108
110
|
const compCellClassName = compConf ? (compConf.tableCellClassName || compConf.cellClassName) : null;
|
|
109
111
|
const compCellStyle = compConf ? (compConf.tableCellStyle || compConf.cellStyle) : '';
|
|
110
112
|
const showAllTip = tooltipOpts.showAll;
|
|
111
|
-
const columnIndex =
|
|
112
|
-
const _columnIndex =
|
|
113
|
+
const columnIndex = colRest.index;
|
|
114
|
+
const _columnIndex = colRest._index;
|
|
113
115
|
const isEdit = isEnableConf(editRender);
|
|
114
116
|
const resizeHeight = resizeHeightFlag ? rowRest.resizeHeight : 0;
|
|
115
117
|
let fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX;
|
|
@@ -131,7 +133,7 @@ export default defineComponent({
|
|
|
131
133
|
const tdAttrs = { colid };
|
|
132
134
|
const cellParams = {
|
|
133
135
|
$table: $xeTable,
|
|
134
|
-
$grid: $
|
|
136
|
+
$grid: $xeGrid,
|
|
135
137
|
isEdit: false,
|
|
136
138
|
seq,
|
|
137
139
|
rowid,
|
|
@@ -432,7 +434,7 @@ export default defineComponent({
|
|
|
432
434
|
};
|
|
433
435
|
}
|
|
434
436
|
const rowid = handleGetRowId(row);
|
|
435
|
-
const rowRest = fullAllDataRowIdData[rowid];
|
|
437
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
436
438
|
let rowLevel = 0;
|
|
437
439
|
let seq = -1;
|
|
438
440
|
let _rowIndex = 0;
|
|
@@ -581,6 +583,7 @@ export default defineComponent({
|
|
|
581
583
|
});
|
|
582
584
|
const renderVN = () => {
|
|
583
585
|
const { slots } = tableContext;
|
|
586
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
584
587
|
const { fixedColumn, fixedType, tableColumn } = props;
|
|
585
588
|
const { spanMethod, footerSpanMethod, mouseConfig } = tableProps;
|
|
586
589
|
const { isGroup, tableData, isRowLoading, isColLoading, overflowX, scrollXLoad, scrollYLoad, isAllOverflow, isDragRowMove, expandColumn, dragRow, dragCol } = tableReactData;
|
|
@@ -661,7 +664,7 @@ export default defineComponent({
|
|
|
661
664
|
let emptyContent;
|
|
662
665
|
const emptySlot = slots ? slots.empty : null;
|
|
663
666
|
if (emptySlot) {
|
|
664
|
-
emptyContent = $xeTable.callSlot(emptySlot, { $table: $xeTable, $grid: $
|
|
667
|
+
emptyContent = $xeTable.callSlot(emptySlot, { $table: $xeTable, $grid: $xeGrid });
|
|
665
668
|
}
|
|
666
669
|
else {
|
|
667
670
|
const compConf = emptyOpts.name ? renderer.get(emptyOpts.name) : null;
|
|
@@ -7,10 +7,10 @@ const { getI18n, formats } = VxeUI;
|
|
|
7
7
|
export class ColumnInfo {
|
|
8
8
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
9
9
|
constructor($xeTable, _vm, { renderHeader, renderCell, renderFooter, renderData } = {}) {
|
|
10
|
-
const
|
|
10
|
+
const tableProps = $xeTable.props;
|
|
11
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
11
12
|
const formatter = _vm.formatter;
|
|
12
13
|
const visible = XEUtils.isBoolean(_vm.visible) ? _vm.visible : true;
|
|
13
|
-
const { props: tableProps } = $xeTable;
|
|
14
14
|
const types = ['seq', 'checkbox', 'radio', 'expand', 'html'];
|
|
15
15
|
if (_vm.type && types.indexOf(_vm.type) === -1) {
|
|
16
16
|
warnLog('vxe.error.errProp', [`type=${_vm.type}`, types.join(', ')]);
|
package/es/table/src/footer.js
CHANGED
|
@@ -49,10 +49,11 @@ export default defineComponent({
|
|
|
49
49
|
const refFooterTFoot = ref();
|
|
50
50
|
const refFooterXSpace = ref();
|
|
51
51
|
const renderRows = (tableColumn, footerTableData, row, $rowIndex, _rowIndex) => {
|
|
52
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
52
53
|
const { fixedType } = props;
|
|
53
54
|
const { resizable: allResizable, border, footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, footerSpanMethod, align: allAlign, columnKey, showFooterOverflow: allColumnFooterOverflow } = tableProps;
|
|
54
55
|
const { scrollXLoad, scrollYLoad, overflowX, currentColumn, mergeFooterList } = tableReactData;
|
|
55
|
-
const { scrollXStore } = tableInternalData;
|
|
56
|
+
const { fullColumnIdData, scrollXStore } = tableInternalData;
|
|
56
57
|
const tooltipOpts = computeTooltipOpts.value;
|
|
57
58
|
const resizableOpts = computeResizableOpts.value;
|
|
58
59
|
const { isAllColumnDrag } = resizableOpts;
|
|
@@ -64,6 +65,7 @@ export default defineComponent({
|
|
|
64
65
|
return tableColumn.map((column, $columnIndex) => {
|
|
65
66
|
const { type, showFooterOverflow, footerAlign, align, footerClassName, editRender, cellRender } = column;
|
|
66
67
|
const colid = column.id;
|
|
68
|
+
const colRest = fullColumnIdData[colid] || {};
|
|
67
69
|
const renderOpts = editRender || cellRender;
|
|
68
70
|
const compConf = renderOpts ? renderer.get(renderOpts.name) : null;
|
|
69
71
|
const showAllTip = tooltipOpts.showAll;
|
|
@@ -79,12 +81,12 @@ export default defineComponent({
|
|
|
79
81
|
const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable));
|
|
80
82
|
const attrs = { colid };
|
|
81
83
|
const tfOns = {};
|
|
82
|
-
const columnIndex =
|
|
83
|
-
const _columnIndex =
|
|
84
|
+
const columnIndex = colRest.index;
|
|
85
|
+
const _columnIndex = colRest._index;
|
|
84
86
|
const itemIndex = _columnIndex;
|
|
85
87
|
const cellParams = {
|
|
86
88
|
$table: $xeTable,
|
|
87
|
-
$grid: $
|
|
89
|
+
$grid: $xeGrid,
|
|
88
90
|
row,
|
|
89
91
|
rowIndex: _rowIndex,
|
|
90
92
|
_rowIndex,
|
package/es/table/src/header.js
CHANGED
|
@@ -33,10 +33,11 @@ export default defineComponent({
|
|
|
33
33
|
headerColumn.value = isGroup ? convertHeaderColumnToRows(props.tableGroupColumn) : [];
|
|
34
34
|
};
|
|
35
35
|
const renderRows = (isGroup, isOptimizeMode, cols, $rowIndex) => {
|
|
36
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
36
37
|
const { fixedType } = props;
|
|
37
38
|
const { resizable: allResizable, columnKey, headerCellClassName, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, mouseConfig } = tableProps;
|
|
38
39
|
const { currentColumn, dragCol, scrollXLoad, scrollYLoad, overflowX } = tableReactData;
|
|
39
|
-
const { scrollXStore } = tableInternalData;
|
|
40
|
+
const { fullColumnIdData, scrollXStore } = tableInternalData;
|
|
40
41
|
const columnOpts = computeColumnOpts.value;
|
|
41
42
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
42
43
|
const cellOpts = computeCellOpts.value;
|
|
@@ -47,6 +48,7 @@ export default defineComponent({
|
|
|
47
48
|
return cols.map((column, $columnIndex) => {
|
|
48
49
|
const { type, showHeaderOverflow, headerAlign, align, filters, headerClassName, editRender, cellRender } = column;
|
|
49
50
|
const colid = column.id;
|
|
51
|
+
const colRest = fullColumnIdData[colid] || {};
|
|
50
52
|
const renderOpts = editRender || cellRender;
|
|
51
53
|
const compConf = renderOpts ? renderer.get(renderOpts.name) : null;
|
|
52
54
|
const isColGroup = column.children && column.children.length;
|
|
@@ -64,9 +66,9 @@ export default defineComponent({
|
|
|
64
66
|
firstFilterOption = filters[0];
|
|
65
67
|
hasFilter = filters.some((item) => item.checked);
|
|
66
68
|
}
|
|
67
|
-
const columnIndex =
|
|
68
|
-
const _columnIndex =
|
|
69
|
-
const cellParams = { $table: $xeTable, $grid: $
|
|
69
|
+
const columnIndex = colRest.index;
|
|
70
|
+
const _columnIndex = colRest._index;
|
|
71
|
+
const cellParams = { $table: $xeTable, $grid: $xeGrid, $rowIndex, column, columnIndex, $columnIndex, _columnIndex, firstFilterOption, fixed: fixedType, type: renderType, isHidden: fixedHiddenColumn, hasFilter };
|
|
70
72
|
const thAttrs = {
|
|
71
73
|
colid,
|
|
72
74
|
colspan: column.colSpan > 1 ? column.colSpan : null,
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -3138,7 +3138,7 @@ function eqEmptyValue(cellValue) {
|
|
|
3138
3138
|
;// ./packages/ui/index.ts
|
|
3139
3139
|
|
|
3140
3140
|
|
|
3141
|
-
const version = "4.12.0-beta.
|
|
3141
|
+
const version = "4.12.0-beta.29";
|
|
3142
3142
|
core_.VxeUI.version = version;
|
|
3143
3143
|
core_.VxeUI.tableVersion = version;
|
|
3144
3144
|
core_.VxeUI.setConfig({
|
|
@@ -3587,7 +3587,7 @@ var esnext_iterator_some = __webpack_require__(7550);
|
|
|
3587
3587
|
const {
|
|
3588
3588
|
log: log_log
|
|
3589
3589
|
} = core_.VxeUI;
|
|
3590
|
-
const log_version = `table v${"4.12.0-beta.
|
|
3590
|
+
const log_version = `table v${"4.12.0-beta.29"}`;
|
|
3591
3591
|
const warnLog = log_log.create('warn', log_version);
|
|
3592
3592
|
const errLog = log_log.create('error', log_version);
|
|
3593
3593
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -3608,12 +3608,10 @@ class ColumnInfo {
|
|
|
3608
3608
|
renderFooter,
|
|
3609
3609
|
renderData
|
|
3610
3610
|
} = {}) {
|
|
3611
|
-
const
|
|
3611
|
+
const tableProps = $xeTable.props;
|
|
3612
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
3612
3613
|
const formatter = _vm.formatter;
|
|
3613
3614
|
const visible = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(_vm.visible) ? _vm.visible : true;
|
|
3614
|
-
const {
|
|
3615
|
-
props: tableProps
|
|
3616
|
-
} = $xeTable;
|
|
3617
3615
|
const types = ['seq', 'checkbox', 'radio', 'expand', 'html'];
|
|
3618
3616
|
if (_vm.type && types.indexOf(_vm.type) === -1) {
|
|
3619
3617
|
warnLog('vxe.error.errProp', [`type=${_vm.type}`, types.join(', ')]);
|
|
@@ -6347,8 +6345,10 @@ const renderType = 'body';
|
|
|
6347
6345
|
* 渲染列
|
|
6348
6346
|
*/
|
|
6349
6347
|
const renderTdColumn = (seq, rowid, fixedType, isOptimizeMode, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, columns, items) => {
|
|
6348
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
6350
6349
|
const {
|
|
6351
6350
|
fullAllDataRowIdData,
|
|
6351
|
+
fullColumnIdData,
|
|
6352
6352
|
visibleColumn
|
|
6353
6353
|
} = tableInternalData;
|
|
6354
6354
|
const {
|
|
@@ -6432,15 +6432,16 @@ const renderType = 'body';
|
|
|
6432
6432
|
const {
|
|
6433
6433
|
actived
|
|
6434
6434
|
} = editStore;
|
|
6435
|
-
const rowRest = fullAllDataRowIdData[rowid];
|
|
6435
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
6436
6436
|
const colid = column.id;
|
|
6437
|
+
const colRest = fullColumnIdData[colid] || {};
|
|
6437
6438
|
const renderOpts = editRender || cellRender;
|
|
6438
6439
|
const compConf = renderOpts ? body_renderer.get(renderOpts.name) : null;
|
|
6439
6440
|
const compCellClassName = compConf ? compConf.tableCellClassName || compConf.cellClassName : null;
|
|
6440
6441
|
const compCellStyle = compConf ? compConf.tableCellStyle || compConf.cellStyle : '';
|
|
6441
6442
|
const showAllTip = tooltipOpts.showAll;
|
|
6442
|
-
const columnIndex =
|
|
6443
|
-
const _columnIndex =
|
|
6443
|
+
const columnIndex = colRest.index;
|
|
6444
|
+
const _columnIndex = colRest._index;
|
|
6444
6445
|
const isEdit = isEnableConf(editRender);
|
|
6445
6446
|
const resizeHeight = resizeHeightFlag ? rowRest.resizeHeight : 0;
|
|
6446
6447
|
let fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX;
|
|
@@ -6464,7 +6465,7 @@ const renderType = 'body';
|
|
|
6464
6465
|
};
|
|
6465
6466
|
const cellParams = {
|
|
6466
6467
|
$table: $xeTable,
|
|
6467
|
-
$grid: $
|
|
6468
|
+
$grid: $xeGrid,
|
|
6468
6469
|
isEdit: false,
|
|
6469
6470
|
seq,
|
|
6470
6471
|
rowid,
|
|
@@ -6789,7 +6790,7 @@ const renderType = 'body';
|
|
|
6789
6790
|
};
|
|
6790
6791
|
}
|
|
6791
6792
|
const rowid = handleGetRowId(row);
|
|
6792
|
-
const rowRest = fullAllDataRowIdData[rowid];
|
|
6793
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
6793
6794
|
let rowLevel = 0;
|
|
6794
6795
|
let seq = -1;
|
|
6795
6796
|
let _rowIndex = 0;
|
|
@@ -6973,6 +6974,7 @@ const renderType = 'body';
|
|
|
6973
6974
|
const {
|
|
6974
6975
|
slots
|
|
6975
6976
|
} = tableContext;
|
|
6977
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
6976
6978
|
const {
|
|
6977
6979
|
fixedColumn,
|
|
6978
6980
|
fixedType,
|
|
@@ -7077,7 +7079,7 @@ const renderType = 'body';
|
|
|
7077
7079
|
if (emptySlot) {
|
|
7078
7080
|
emptyContent = $xeTable.callSlot(emptySlot, {
|
|
7079
7081
|
$table: $xeTable,
|
|
7080
|
-
$grid: $
|
|
7082
|
+
$grid: $xeGrid
|
|
7081
7083
|
});
|
|
7082
7084
|
} else {
|
|
7083
7085
|
const compConf = emptyOpts.name ? body_renderer.get(emptyOpts.name) : null;
|
|
@@ -7235,6 +7237,7 @@ const header_renderType = 'header';
|
|
|
7235
7237
|
headerColumn.value = isGroup ? convertHeaderColumnToRows(props.tableGroupColumn) : [];
|
|
7236
7238
|
};
|
|
7237
7239
|
const renderRows = (isGroup, isOptimizeMode, cols, $rowIndex) => {
|
|
7240
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
7238
7241
|
const {
|
|
7239
7242
|
fixedType
|
|
7240
7243
|
} = props;
|
|
@@ -7256,6 +7259,7 @@ const header_renderType = 'header';
|
|
|
7256
7259
|
overflowX
|
|
7257
7260
|
} = tableReactData;
|
|
7258
7261
|
const {
|
|
7262
|
+
fullColumnIdData,
|
|
7259
7263
|
scrollXStore
|
|
7260
7264
|
} = tableInternalData;
|
|
7261
7265
|
const columnOpts = computeColumnOpts.value;
|
|
@@ -7281,6 +7285,7 @@ const header_renderType = 'header';
|
|
|
7281
7285
|
cellRender
|
|
7282
7286
|
} = column;
|
|
7283
7287
|
const colid = column.id;
|
|
7288
|
+
const colRest = fullColumnIdData[colid] || {};
|
|
7284
7289
|
const renderOpts = editRender || cellRender;
|
|
7285
7290
|
const compConf = renderOpts ? header_renderer.get(renderOpts.name) : null;
|
|
7286
7291
|
const isColGroup = column.children && column.children.length;
|
|
@@ -7298,11 +7303,11 @@ const header_renderType = 'header';
|
|
|
7298
7303
|
firstFilterOption = filters[0];
|
|
7299
7304
|
hasFilter = filters.some(item => item.checked);
|
|
7300
7305
|
}
|
|
7301
|
-
const columnIndex =
|
|
7302
|
-
const _columnIndex =
|
|
7306
|
+
const columnIndex = colRest.index;
|
|
7307
|
+
const _columnIndex = colRest._index;
|
|
7303
7308
|
const cellParams = {
|
|
7304
7309
|
$table: $xeTable,
|
|
7305
|
-
$grid: $
|
|
7310
|
+
$grid: $xeGrid,
|
|
7306
7311
|
$rowIndex,
|
|
7307
7312
|
column,
|
|
7308
7313
|
columnIndex,
|
|
@@ -7701,6 +7706,7 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
7701
7706
|
const refFooterTFoot = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
7702
7707
|
const refFooterXSpace = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
7703
7708
|
const renderRows = (tableColumn, footerTableData, row, $rowIndex, _rowIndex) => {
|
|
7709
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
7704
7710
|
const {
|
|
7705
7711
|
fixedType
|
|
7706
7712
|
} = props;
|
|
@@ -7723,6 +7729,7 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
7723
7729
|
mergeFooterList
|
|
7724
7730
|
} = tableReactData;
|
|
7725
7731
|
const {
|
|
7732
|
+
fullColumnIdData,
|
|
7726
7733
|
scrollXStore
|
|
7727
7734
|
} = tableInternalData;
|
|
7728
7735
|
const tooltipOpts = computeTooltipOpts.value;
|
|
@@ -7746,6 +7753,7 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
7746
7753
|
cellRender
|
|
7747
7754
|
} = column;
|
|
7748
7755
|
const colid = column.id;
|
|
7756
|
+
const colRest = fullColumnIdData[colid] || {};
|
|
7749
7757
|
const renderOpts = editRender || cellRender;
|
|
7750
7758
|
const compConf = renderOpts ? footer_renderer.get(renderOpts.name) : null;
|
|
7751
7759
|
const showAllTip = tooltipOpts.showAll;
|
|
@@ -7763,12 +7771,12 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
7763
7771
|
colid
|
|
7764
7772
|
};
|
|
7765
7773
|
const tfOns = {};
|
|
7766
|
-
const columnIndex =
|
|
7767
|
-
const _columnIndex =
|
|
7774
|
+
const columnIndex = colRest.index;
|
|
7775
|
+
const _columnIndex = colRest._index;
|
|
7768
7776
|
const itemIndex = _columnIndex;
|
|
7769
7777
|
const cellParams = {
|
|
7770
7778
|
$table: $xeTable,
|
|
7771
|
-
$grid: $
|
|
7779
|
+
$grid: $xeGrid,
|
|
7772
7780
|
row,
|
|
7773
7781
|
rowIndex: _rowIndex,
|
|
7774
7782
|
_rowIndex,
|
|
@@ -8871,6 +8879,7 @@ const {
|
|
|
8871
8879
|
}, panel_getI18n('vxe.custom.cstmDragTarget', [dragCol && dragCol.type !== 'html' ? dragCol.getTitle() : '']))])])]);
|
|
8872
8880
|
};
|
|
8873
8881
|
const renderSimplePanel = () => {
|
|
8882
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
8874
8883
|
const {
|
|
8875
8884
|
customStore
|
|
8876
8885
|
} = props;
|
|
@@ -8916,7 +8925,7 @@ const {
|
|
|
8916
8925
|
}
|
|
8917
8926
|
const params = {
|
|
8918
8927
|
$table: $xeTable,
|
|
8919
|
-
$grid: $
|
|
8928
|
+
$grid: $xeGrid,
|
|
8920
8929
|
columns: customColumnList,
|
|
8921
8930
|
isAllChecked,
|
|
8922
8931
|
isAllIndeterminate,
|
|
@@ -9073,6 +9082,7 @@ const {
|
|
|
9073
9082
|
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()])]) : null] : []);
|
|
9074
9083
|
};
|
|
9075
9084
|
const renderPopupPanel = () => {
|
|
9085
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
9076
9086
|
const {
|
|
9077
9087
|
customStore
|
|
9078
9088
|
} = props;
|
|
@@ -9125,7 +9135,7 @@ const {
|
|
|
9125
9135
|
const isAllIndeterminate = customStore.isIndeterminate;
|
|
9126
9136
|
const params = {
|
|
9127
9137
|
$table: $xeTable,
|
|
9128
|
-
$grid: $
|
|
9138
|
+
$grid: $xeGrid,
|
|
9129
9139
|
columns: customColumnList,
|
|
9130
9140
|
isAllChecked,
|
|
9131
9141
|
isAllIndeterminate,
|
|
@@ -9736,6 +9746,7 @@ const {
|
|
|
9736
9746
|
});
|
|
9737
9747
|
};
|
|
9738
9748
|
const renderVN = () => {
|
|
9749
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
9739
9750
|
const {
|
|
9740
9751
|
defaultOptions,
|
|
9741
9752
|
storeData
|
|
@@ -9772,7 +9783,7 @@ const {
|
|
|
9772
9783
|
default: () => {
|
|
9773
9784
|
const params = {
|
|
9774
9785
|
$table: $xeTable,
|
|
9775
|
-
$grid: $
|
|
9786
|
+
$grid: $xeGrid,
|
|
9776
9787
|
options: defaultOptions,
|
|
9777
9788
|
params: defaultOptions.params
|
|
9778
9789
|
};
|
|
@@ -9810,7 +9821,7 @@ const {
|
|
|
9810
9821
|
footer() {
|
|
9811
9822
|
const params = {
|
|
9812
9823
|
$table: $xeTable,
|
|
9813
|
-
$grid: $
|
|
9824
|
+
$grid: $xeGrid,
|
|
9814
9825
|
options: defaultOptions,
|
|
9815
9826
|
params: defaultOptions.params
|
|
9816
9827
|
};
|
|
@@ -10031,6 +10042,7 @@ const {
|
|
|
10031
10042
|
}
|
|
10032
10043
|
};
|
|
10033
10044
|
const renderVN = () => {
|
|
10045
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
10034
10046
|
const {
|
|
10035
10047
|
defaultOptions,
|
|
10036
10048
|
storeData
|
|
@@ -10116,7 +10128,7 @@ const {
|
|
|
10116
10128
|
default: () => {
|
|
10117
10129
|
const params = {
|
|
10118
10130
|
$table: $xeTable,
|
|
10119
|
-
$grid: $
|
|
10131
|
+
$grid: $xeGrid,
|
|
10120
10132
|
options: defaultOptions,
|
|
10121
10133
|
columns,
|
|
10122
10134
|
params: defaultOptions.params
|
|
@@ -10257,7 +10269,7 @@ const {
|
|
|
10257
10269
|
footer() {
|
|
10258
10270
|
const params = {
|
|
10259
10271
|
$table: $xeTable,
|
|
10260
|
-
$grid: $
|
|
10272
|
+
$grid: $xeGrid,
|
|
10261
10273
|
options: defaultOptions,
|
|
10262
10274
|
columns,
|
|
10263
10275
|
params: defaultOptions.params
|
|
@@ -12118,13 +12130,14 @@ menu_hook_hooks.add('tableMenuModule', {
|
|
|
12118
12130
|
* 快捷菜单点击事件
|
|
12119
12131
|
*/
|
|
12120
12132
|
ctxMenuLinkEvent(evnt, menu) {
|
|
12133
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
12121
12134
|
// 如果一级菜单有配置 code 则允许点击,否则不能点击
|
|
12122
12135
|
if (!menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
|
|
12123
12136
|
const gMenuOpts = hook_menus.get(menu.code);
|
|
12124
12137
|
const params = Object.assign({}, internalData._currMenuParams, {
|
|
12125
12138
|
menu,
|
|
12126
12139
|
$table: $xeTable,
|
|
12127
|
-
$grid: $
|
|
12140
|
+
$grid: $xeGrid,
|
|
12128
12141
|
$event: evnt
|
|
12129
12142
|
});
|
|
12130
12143
|
const tmMethod = gMenuOpts ? gMenuOpts.tableMenuMethod || gMenuOpts.menuMethod : null;
|
|
@@ -12635,6 +12648,7 @@ edit_hook_hooks.add('tableEditModule', {
|
|
|
12635
12648
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => $xeTable.updateCellAreas());
|
|
12636
12649
|
};
|
|
12637
12650
|
const handleEditActive = (params, evnt, isFocus, isPos) => {
|
|
12651
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
12638
12652
|
const {
|
|
12639
12653
|
editConfig,
|
|
12640
12654
|
mouseConfig
|
|
@@ -12670,7 +12684,7 @@ edit_hook_hooks.add('tableEditModule', {
|
|
|
12670
12684
|
if (!beforeEditMethod || beforeEditMethod({
|
|
12671
12685
|
...params,
|
|
12672
12686
|
$table: $xeTable,
|
|
12673
|
-
$grid: $
|
|
12687
|
+
$grid: $xeGrid
|
|
12674
12688
|
})) {
|
|
12675
12689
|
if (mouseConfig) {
|
|
12676
12690
|
$xeTable.clearSelected();
|
|
@@ -12702,7 +12716,7 @@ edit_hook_hooks.add('tableEditModule', {
|
|
|
12702
12716
|
afterEditMethod({
|
|
12703
12717
|
...params,
|
|
12704
12718
|
$table: $xeTable,
|
|
12705
|
-
$grid: $
|
|
12719
|
+
$grid: $xeGrid
|
|
12706
12720
|
});
|
|
12707
12721
|
}
|
|
12708
12722
|
});
|
|
@@ -16166,6 +16180,7 @@ validator_hook_hooks.add('tableValidatorModule', {
|
|
|
16166
16180
|
* trigger=blur|change 触发方式(除非特殊场景,否则默认为空就行)
|
|
16167
16181
|
*/
|
|
16168
16182
|
validCellRules(validType, row, column, val) {
|
|
16183
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
16169
16184
|
const {
|
|
16170
16185
|
editRules
|
|
16171
16186
|
} = props;
|
|
@@ -16197,7 +16212,7 @@ validator_hook_hooks.add('tableValidatorModule', {
|
|
|
16197
16212
|
columnIndex: $xeTable.getColumnIndex(column),
|
|
16198
16213
|
field: column.field,
|
|
16199
16214
|
$table: $xeTable,
|
|
16200
|
-
$grid: $
|
|
16215
|
+
$grid: $xeGrid
|
|
16201
16216
|
};
|
|
16202
16217
|
let customValid;
|
|
16203
16218
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(validator)) {
|
|
@@ -16413,7 +16428,7 @@ core_.VxeUI.hooks.add('tableCustomModule', {
|
|
|
16413
16428
|
const {
|
|
16414
16429
|
refElem
|
|
16415
16430
|
} = $xeTable.getRefMaps();
|
|
16416
|
-
const $xeGrid = $xeTable.
|
|
16431
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
16417
16432
|
const calcMaxHeight = () => {
|
|
16418
16433
|
const {
|
|
16419
16434
|
customStore
|