vxe-table 3.11.34 → 3.11.36
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/edit/mixin.js +57 -33
- package/es/table/module/export/mixin.js +23 -20
- package/es/table/module/filter/panel.js +10 -7
- package/es/table/src/methods.js +17 -10
- package/es/table/style.css +3 -25
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +2 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +3 -25
- 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 +121 -71
- 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/edit/mixin.js +67 -33
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/mixin.js +22 -19
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/filter/panel.js +12 -6
- package/lib/table/module/filter/panel.min.js +1 -1
- package/lib/table/src/methods.js +17 -11
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/style/style.css +3 -25
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +2 -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 +3 -25
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/table/module/edit/mixin.ts +58 -33
- package/packages/table/module/export/mixin.ts +24 -20
- package/packages/table/module/filter/panel.ts +11 -7
- package/packages/table/src/methods.ts +17 -10
- package/packages/ui/index.ts +1 -0
- package/styles/components/table.scss +3 -22
- /package/es/{iconfont.1734489177027.ttf → iconfont.1734659093549.ttf} +0 -0
- /package/es/{iconfont.1734489177027.woff → iconfont.1734659093549.woff} +0 -0
- /package/es/{iconfont.1734489177027.woff2 → iconfont.1734659093549.woff2} +0 -0
- /package/lib/{iconfont.1734489177027.ttf → iconfont.1734659093549.ttf} +0 -0
- /package/lib/{iconfont.1734489177027.woff → iconfont.1734659093549.woff} +0 -0
- /package/lib/{iconfont.1734489177027.woff2 → iconfont.1734659093549.woff2} +0 -0
|
@@ -46,8 +46,7 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
function handleInsertRowAt(
|
|
50
|
-
const $xeTable = _vm;
|
|
49
|
+
function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
51
50
|
const props = $xeTable;
|
|
52
51
|
const reactData = $xeTable;
|
|
53
52
|
const internalData = $xeTable;
|
|
@@ -60,11 +59,11 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
60
59
|
if (!XEUtils.isArray(records)) {
|
|
61
60
|
records = [records];
|
|
62
61
|
}
|
|
63
|
-
const newRecords =
|
|
64
|
-
if (XEUtils.eqNull(
|
|
62
|
+
const newRecords = $xeTable.defineField(records.map(record => Object.assign(treeConfig && transform ? { [mapChildrenField]: [], [childrenField]: [] } : {}, record)));
|
|
63
|
+
if (XEUtils.eqNull(targetRow)) {
|
|
65
64
|
// 如果为虚拟树
|
|
66
65
|
if (treeConfig && transform) {
|
|
67
|
-
insertTreeRow(
|
|
66
|
+
insertTreeRow($xeTable, newRecords, false);
|
|
68
67
|
}
|
|
69
68
|
else {
|
|
70
69
|
newRecords.forEach(item => {
|
|
@@ -85,10 +84,10 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
85
84
|
}
|
|
86
85
|
}
|
|
87
86
|
else {
|
|
88
|
-
if (
|
|
87
|
+
if (targetRow === -1) {
|
|
89
88
|
// 如果为虚拟树
|
|
90
89
|
if (treeConfig && transform) {
|
|
91
|
-
insertTreeRow(
|
|
90
|
+
insertTreeRow($xeTable, newRecords, true);
|
|
92
91
|
}
|
|
93
92
|
else {
|
|
94
93
|
newRecords.forEach(item => {
|
|
@@ -111,14 +110,14 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
111
110
|
else {
|
|
112
111
|
// 如果为虚拟树
|
|
113
112
|
if (treeConfig && transform) {
|
|
114
|
-
const matchMapObj = XEUtils.findTree(tableFullTreeData, (item) =>
|
|
113
|
+
const matchMapObj = XEUtils.findTree(tableFullTreeData, (item) => targetRow[rowField] === item[rowField], { children: mapChildrenField });
|
|
115
114
|
if (matchMapObj) {
|
|
116
115
|
const { parent: parentRow } = matchMapObj;
|
|
117
116
|
const parentMapChilds = parentRow ? parentRow[mapChildrenField] : tableFullTreeData;
|
|
118
|
-
const parentRest = fullAllDataRowIdData[getRowid(
|
|
117
|
+
const parentRest = fullAllDataRowIdData[getRowid($xeTable, parentRow)];
|
|
119
118
|
const parentLevel = parentRest ? parentRest.level : 0;
|
|
120
119
|
newRecords.forEach((item, i) => {
|
|
121
|
-
const rowid = getRowid(
|
|
120
|
+
const rowid = getRowid($xeTable, item);
|
|
122
121
|
if (process.env.NODE_ENV === 'development') {
|
|
123
122
|
if (item[treeOpts.parentField]) {
|
|
124
123
|
if (parentRow && item[treeOpts.parentField] !== parentRow[rowField]) {
|
|
@@ -140,7 +139,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
140
139
|
});
|
|
141
140
|
// 源
|
|
142
141
|
if (parentRow) {
|
|
143
|
-
const matchObj = XEUtils.findTree(tableFullTreeData, (item) =>
|
|
142
|
+
const matchObj = XEUtils.findTree(tableFullTreeData, (item) => targetRow[rowField] === item[rowField], { children: childrenField });
|
|
144
143
|
if (matchObj) {
|
|
145
144
|
const parentChilds = matchObj.items;
|
|
146
145
|
let targetIndex = matchObj.index;
|
|
@@ -155,7 +154,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
155
154
|
if (process.env.NODE_ENV === 'development') {
|
|
156
155
|
warnLog('vxe.error.unableInsert');
|
|
157
156
|
}
|
|
158
|
-
insertTreeRow(
|
|
157
|
+
insertTreeRow($xeTable, newRecords, true);
|
|
159
158
|
}
|
|
160
159
|
}
|
|
161
160
|
else {
|
|
@@ -164,13 +163,13 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
164
163
|
}
|
|
165
164
|
let afIndex = -1;
|
|
166
165
|
// 如果是可视索引
|
|
167
|
-
if (XEUtils.isNumber(
|
|
168
|
-
if (
|
|
169
|
-
afIndex =
|
|
166
|
+
if (XEUtils.isNumber(targetRow)) {
|
|
167
|
+
if (targetRow < afterFullData.length) {
|
|
168
|
+
afIndex = targetRow;
|
|
170
169
|
}
|
|
171
170
|
}
|
|
172
171
|
else {
|
|
173
|
-
afIndex =
|
|
172
|
+
afIndex = $xeTable.findRowIndexOf(afterFullData, targetRow);
|
|
174
173
|
}
|
|
175
174
|
// 如果是插入指定行的下一行
|
|
176
175
|
if (isInsertNextRow) {
|
|
@@ -180,7 +179,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
180
179
|
throw new Error(errLog('vxe.error.unableInsert'));
|
|
181
180
|
}
|
|
182
181
|
afterFullData.splice(afIndex, 0, ...newRecords);
|
|
183
|
-
tableFullData.splice(
|
|
182
|
+
tableFullData.splice($xeTable.findRowIndexOf(tableFullData, targetRow), 0, ...newRecords);
|
|
184
183
|
// 刷新单元格合并
|
|
185
184
|
mergeList.forEach((mergeItem) => {
|
|
186
185
|
const { row: mergeRowIndex, rowspan: mergeRowspan } = mergeItem;
|
|
@@ -199,20 +198,20 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
199
198
|
const rowid = getRowid($xeTable, newRow);
|
|
200
199
|
insertMaps[rowid] = newRow;
|
|
201
200
|
});
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
201
|
+
$xeTable.cacheRowMap();
|
|
202
|
+
$xeTable.updateScrollYStatus();
|
|
203
|
+
$xeTable.handleTableData(treeConfig && transform);
|
|
205
204
|
if (!(treeConfig && transform)) {
|
|
206
|
-
|
|
205
|
+
$xeTable.updateAfterDataIndex();
|
|
207
206
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
if (
|
|
211
|
-
|
|
207
|
+
$xeTable.updateFooter();
|
|
208
|
+
$xeTable.checkSelectionStatus();
|
|
209
|
+
if ($xeTable.scrollYLoad) {
|
|
210
|
+
$xeTable.updateScrollYSpace();
|
|
212
211
|
}
|
|
213
|
-
return
|
|
214
|
-
|
|
215
|
-
return
|
|
212
|
+
return $xeTable.$nextTick().then(() => {
|
|
213
|
+
$xeTable.updateCellAreas();
|
|
214
|
+
return $xeTable.recalculate();
|
|
216
215
|
}).then(() => {
|
|
217
216
|
return {
|
|
218
217
|
row: newRecords.length ? newRecords[newRecords.length - 1] : null,
|
|
@@ -220,6 +219,22 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
220
219
|
};
|
|
221
220
|
});
|
|
222
221
|
}
|
|
222
|
+
function handleInsertChildRowAt($xeTable, records, parentRow, targetRow, isInsertNextRow) {
|
|
223
|
+
const props = $xeTable;
|
|
224
|
+
const { treeConfig } = props;
|
|
225
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
226
|
+
const { transform, rowField, parentField } = treeOpts;
|
|
227
|
+
if (treeConfig && transform) {
|
|
228
|
+
if (!XEUtils.isArray(records)) {
|
|
229
|
+
records = [records];
|
|
230
|
+
}
|
|
231
|
+
return handleInsertRowAt($xeTable, records.map((item) => Object.assign({}, item, { [parentField]: parentRow[rowField] })), targetRow, isInsertNextRow);
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
errLog('vxe.error.errProp', ['tree-config.treeConfig=false', 'tree-config.treeConfig=true']);
|
|
235
|
+
}
|
|
236
|
+
return Promise.resolve({ row: null, rows: [] });
|
|
237
|
+
}
|
|
223
238
|
export default {
|
|
224
239
|
methods: {
|
|
225
240
|
/**
|
|
@@ -236,14 +251,23 @@ export default {
|
|
|
236
251
|
* 如果 row 为 -1 则从插入到底部
|
|
237
252
|
* 如果 row 为有效行则插入到该行的位置
|
|
238
253
|
* @param {Object/Array} records 新的数据
|
|
239
|
-
* @param {Row}
|
|
254
|
+
* @param {Row} targetRow 指定行
|
|
240
255
|
* @returns
|
|
241
256
|
*/
|
|
242
|
-
_insertAt(records,
|
|
243
|
-
return handleInsertRowAt(this, records,
|
|
257
|
+
_insertAt(records, targetRow) {
|
|
258
|
+
return handleInsertRowAt(this, records, targetRow);
|
|
259
|
+
},
|
|
260
|
+
_insertNextAt(records, targetRow) {
|
|
261
|
+
return handleInsertRowAt(this, records, targetRow, true);
|
|
262
|
+
},
|
|
263
|
+
_insertChild(records, parentRow) {
|
|
264
|
+
return handleInsertChildRowAt(this, records, parentRow, null);
|
|
265
|
+
},
|
|
266
|
+
_insertChildAt(records, parentRow, targetRow) {
|
|
267
|
+
return handleInsertChildRowAt(this, records, parentRow, targetRow);
|
|
244
268
|
},
|
|
245
|
-
|
|
246
|
-
return
|
|
269
|
+
_insertChildNextAt(records, parentRow, targetRow) {
|
|
270
|
+
return handleInsertChildRowAt(this, records, parentRow, targetRow, true);
|
|
247
271
|
},
|
|
248
272
|
/**
|
|
249
273
|
* 删除指定行数据
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import { VxeUI } from '../../../ui';
|
|
3
3
|
import { isColumnInfo, mergeBodyMethod, getCellValue } from '../../src/util';
|
|
4
|
-
import { parseFile, formatText } from '../../../ui/src/utils';
|
|
4
|
+
import { parseFile, formatText, eqEmptyValue } from '../../../ui/src/utils';
|
|
5
5
|
import { browse } from '../../../ui/src/dom';
|
|
6
6
|
import { createHtmlPage, getExportBlobByContent } from './util';
|
|
7
7
|
import { warnLog, errLog } from '../../../ui/src/log';
|
|
@@ -54,9 +54,12 @@ function toTableBorder(border) {
|
|
|
54
54
|
function toBooleanValue(cellValue) {
|
|
55
55
|
return XEUtils.isBoolean(cellValue) ? (cellValue ? 'TRUE' : 'FALSE') : cellValue;
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
const toStringValue = (cellValue) => {
|
|
58
|
+
return eqEmptyValue(cellValue) ? '' : `${cellValue}`;
|
|
59
|
+
};
|
|
60
|
+
function getBodyLabelData($xeTable, opts, columns, datas) {
|
|
58
61
|
const { isAllExpand, mode } = opts;
|
|
59
|
-
const { treeConfig, treeOpts, radioOpts, checkboxOpts, columnOpts } = $
|
|
62
|
+
const { treeConfig, treeOpts, radioOpts, checkboxOpts, columnOpts } = $xeTable;
|
|
60
63
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
61
64
|
if (!htmlCellElem) {
|
|
62
65
|
htmlCellElem = document.createElement('div');
|
|
@@ -68,13 +71,13 @@ function getBodyLabelData($xetable, opts, columns, datas) {
|
|
|
68
71
|
XEUtils.eachTree(datas, (item, $rowIndex, items, path, parent, nodes) => {
|
|
69
72
|
const row = item._row || item;
|
|
70
73
|
const parentRow = parent && parent._row ? parent._row : parent;
|
|
71
|
-
if ((isAllExpand || !parentRow || (expandMaps.has(parentRow) && $
|
|
72
|
-
const hasRowChild = hasTreeChildren($
|
|
74
|
+
if ((isAllExpand || !parentRow || (expandMaps.has(parentRow) && $xeTable.isTreeExpandByRow(parentRow)))) {
|
|
75
|
+
const hasRowChild = hasTreeChildren($xeTable, row);
|
|
73
76
|
const item = {
|
|
74
77
|
_row: row,
|
|
75
78
|
_level: nodes.length - 1,
|
|
76
79
|
_hasChild: hasRowChild,
|
|
77
|
-
_expand: hasRowChild && $
|
|
80
|
+
_expand: hasRowChild && $xeTable.isTreeExpandByRow(row)
|
|
78
81
|
};
|
|
79
82
|
columns.forEach((column, $columnIndex) => {
|
|
80
83
|
let cellValue = '';
|
|
@@ -90,22 +93,22 @@ function getBodyLabelData($xetable, opts, columns, datas) {
|
|
|
90
93
|
bodyExportMethod = columnOpts.exportMethod;
|
|
91
94
|
}
|
|
92
95
|
if (bodyExportMethod) {
|
|
93
|
-
cellValue = bodyExportMethod({ $table: $
|
|
96
|
+
cellValue = bodyExportMethod({ $table: $xeTable, row, column, options: opts });
|
|
94
97
|
}
|
|
95
98
|
else {
|
|
96
99
|
switch (column.type) {
|
|
97
100
|
case 'seq': {
|
|
98
101
|
const seqValue = path.map((num, i) => i % 2 === 0 ? (Number(num) + 1) : '.').join('');
|
|
99
|
-
cellValue = mode === 'all' ? seqValue : getSeq($
|
|
102
|
+
cellValue = mode === 'all' ? seqValue : getSeq($xeTable, seqValue, row, $rowIndex, column, $columnIndex);
|
|
100
103
|
break;
|
|
101
104
|
}
|
|
102
105
|
case 'checkbox':
|
|
103
|
-
cellValue = toBooleanValue($
|
|
106
|
+
cellValue = toBooleanValue($xeTable.isCheckedByCheckboxRow(row));
|
|
104
107
|
item._checkboxLabel = checkboxOpts.labelField ? XEUtils.get(row, checkboxOpts.labelField) : '';
|
|
105
108
|
item._checkboxDisabled = checkboxOpts.checkMethod && !checkboxOpts.checkMethod({ row });
|
|
106
109
|
break;
|
|
107
110
|
case 'radio':
|
|
108
|
-
cellValue = toBooleanValue($
|
|
111
|
+
cellValue = toBooleanValue($xeTable.isCheckedByRadioRow(row));
|
|
109
112
|
item._radioLabel = radioOpts.labelField ? XEUtils.get(row, radioOpts.labelField) : '';
|
|
110
113
|
item._radioDisabled = radioOpts.checkMethod && !radioOpts.checkMethod({ row });
|
|
111
114
|
break;
|
|
@@ -114,13 +117,13 @@ function getBodyLabelData($xetable, opts, columns, datas) {
|
|
|
114
117
|
cellValue = getCellValue(row, column);
|
|
115
118
|
}
|
|
116
119
|
else {
|
|
117
|
-
cellValue = $
|
|
120
|
+
cellValue = $xeTable.getCellLabel(row, column);
|
|
118
121
|
if (column.type === 'html') {
|
|
119
122
|
htmlCellElem.innerHTML = cellValue;
|
|
120
123
|
cellValue = htmlCellElem.innerText.trim();
|
|
121
124
|
}
|
|
122
125
|
else {
|
|
123
|
-
const cell = $
|
|
126
|
+
const cell = $xeTable.getCellElement(row, column);
|
|
124
127
|
if (cell) {
|
|
125
128
|
cellValue = cell.innerText.trim();
|
|
126
129
|
}
|
|
@@ -128,7 +131,7 @@ function getBodyLabelData($xetable, opts, columns, datas) {
|
|
|
128
131
|
}
|
|
129
132
|
}
|
|
130
133
|
}
|
|
131
|
-
item[column.id] =
|
|
134
|
+
item[column.id] = toStringValue(cellValue);
|
|
132
135
|
});
|
|
133
136
|
expandMaps.set(row, 1);
|
|
134
137
|
rest.push(Object.assign(item, row));
|
|
@@ -154,22 +157,22 @@ function getBodyLabelData($xetable, opts, columns, datas) {
|
|
|
154
157
|
bodyExportMethod = columnOpts.exportMethod;
|
|
155
158
|
}
|
|
156
159
|
if (bodyExportMethod) {
|
|
157
|
-
cellValue = bodyExportMethod({ $table: $
|
|
160
|
+
cellValue = bodyExportMethod({ $table: $xeTable, row, column, options: opts });
|
|
158
161
|
}
|
|
159
162
|
else {
|
|
160
163
|
switch (column.type) {
|
|
161
164
|
case 'seq': {
|
|
162
165
|
const seqValue = $rowIndex + 1;
|
|
163
|
-
cellValue = mode === 'all' ? seqValue : getSeq($
|
|
166
|
+
cellValue = mode === 'all' ? seqValue : getSeq($xeTable, seqValue, row, $rowIndex, column, $columnIndex);
|
|
164
167
|
break;
|
|
165
168
|
}
|
|
166
169
|
case 'checkbox':
|
|
167
|
-
cellValue = toBooleanValue($
|
|
170
|
+
cellValue = toBooleanValue($xeTable.isCheckedByCheckboxRow(row));
|
|
168
171
|
item._checkboxLabel = checkboxOpts.labelField ? XEUtils.get(row, checkboxOpts.labelField) : '';
|
|
169
172
|
item._checkboxDisabled = checkboxOpts.checkMethod && !checkboxOpts.checkMethod({ row });
|
|
170
173
|
break;
|
|
171
174
|
case 'radio':
|
|
172
|
-
cellValue = toBooleanValue($
|
|
175
|
+
cellValue = toBooleanValue($xeTable.isCheckedByRadioRow(row));
|
|
173
176
|
item._radioLabel = radioOpts.labelField ? XEUtils.get(row, radioOpts.labelField) : '';
|
|
174
177
|
item._radioDisabled = radioOpts.checkMethod && !radioOpts.checkMethod({ row });
|
|
175
178
|
break;
|
|
@@ -178,13 +181,13 @@ function getBodyLabelData($xetable, opts, columns, datas) {
|
|
|
178
181
|
cellValue = getCellValue(row, column);
|
|
179
182
|
}
|
|
180
183
|
else {
|
|
181
|
-
cellValue = $
|
|
184
|
+
cellValue = $xeTable.getCellLabel(row, column);
|
|
182
185
|
if (column.type === 'html') {
|
|
183
186
|
htmlCellElem.innerHTML = cellValue;
|
|
184
187
|
cellValue = htmlCellElem.innerText.trim();
|
|
185
188
|
}
|
|
186
189
|
else {
|
|
187
|
-
const cell = $
|
|
190
|
+
const cell = $xeTable.getCellElement(row, column);
|
|
188
191
|
if (cell) {
|
|
189
192
|
cellValue = cell.innerText.trim();
|
|
190
193
|
}
|
|
@@ -192,7 +195,7 @@ function getBodyLabelData($xetable, opts, columns, datas) {
|
|
|
192
195
|
}
|
|
193
196
|
}
|
|
194
197
|
}
|
|
195
|
-
item[column.id] =
|
|
198
|
+
item[column.id] = toStringValue(cellValue);
|
|
196
199
|
});
|
|
197
200
|
return item;
|
|
198
201
|
});
|
|
@@ -14,25 +14,28 @@ export default {
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
render(h) {
|
|
17
|
-
const
|
|
18
|
-
const {
|
|
17
|
+
const $xeTable = this.$parent;
|
|
18
|
+
const { filterStore } = this;
|
|
19
|
+
const { args, visible, multiple, column } = filterStore;
|
|
19
20
|
const filterRender = column ? column.filterRender : null;
|
|
20
21
|
const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null;
|
|
21
22
|
const filterClassName = compConf ? (compConf.tableFilterClassName || compConf.filterClassName) : '';
|
|
23
|
+
const filterOpts = $xeTable.computeFilterOpts;
|
|
24
|
+
const { destroyOnClose } = filterOpts;
|
|
22
25
|
return h('div', {
|
|
23
26
|
class: [
|
|
24
27
|
'vxe-table--filter-wrapper',
|
|
25
28
|
'filter--prevent-default',
|
|
26
29
|
compConf && compConf.className ? compConf.className : '',
|
|
27
|
-
getClass(filterClassName, Object.assign({ $panel: this, $table: $
|
|
30
|
+
getClass(filterClassName, Object.assign({ $panel: this, $table: $xeTable }, args)),
|
|
28
31
|
{
|
|
29
|
-
'is--animat': $
|
|
30
|
-
'is--multiple':
|
|
31
|
-
'is--active':
|
|
32
|
+
'is--animat': $xeTable.animat,
|
|
33
|
+
'is--multiple': multiple,
|
|
34
|
+
'is--active': visible
|
|
32
35
|
}
|
|
33
36
|
],
|
|
34
37
|
style: filterStore.style
|
|
35
|
-
}, filterStore.visible && column ? this.renderOptions(h, filterRender, compConf).concat(this.renderFooter(h)) : []);
|
|
38
|
+
}, filterStore.visible && (destroyOnClose ? visible : true) && column ? this.renderOptions(h, filterRender, compConf).concat(this.renderFooter(h)) : []);
|
|
36
39
|
},
|
|
37
40
|
methods: {
|
|
38
41
|
renderOptions(h, filterRender, compConf) {
|
package/es/table/src/methods.js
CHANGED
|
@@ -2676,7 +2676,7 @@ const Methods = {
|
|
|
2676
2676
|
const internalData = $xeTable;
|
|
2677
2677
|
const { rceTimeout } = internalData;
|
|
2678
2678
|
const el = $xeTable.$refs.refElem;
|
|
2679
|
-
if (
|
|
2679
|
+
if (el && el.clientWidth) {
|
|
2680
2680
|
$xeTable.autoCellWidth();
|
|
2681
2681
|
}
|
|
2682
2682
|
if (rceTimeout) {
|
|
@@ -6238,17 +6238,24 @@ const Methods = {
|
|
|
6238
6238
|
const rowRest = fullAllDataRowIdData[getRowid($xeTable, row)];
|
|
6239
6239
|
return rowRest && !!rowRest.treeLoaded;
|
|
6240
6240
|
},
|
|
6241
|
-
clearTreeExpandLoaded(
|
|
6241
|
+
clearTreeExpandLoaded(rows) {
|
|
6242
6242
|
const $xeTable = this;
|
|
6243
6243
|
const { treeOpts, treeExpandedMaps, fullAllDataRowIdData } = this;
|
|
6244
|
-
const { transform
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
rowRest.treeLoaded = false;
|
|
6249
|
-
if (treeExpandedMaps[rowid]) {
|
|
6250
|
-
delete treeExpandedMaps[rowid];
|
|
6244
|
+
const { transform } = treeOpts;
|
|
6245
|
+
if (rows) {
|
|
6246
|
+
if (!XEUtils.isArray(rows)) {
|
|
6247
|
+
rows = [rows];
|
|
6251
6248
|
}
|
|
6249
|
+
rows.forEach((row) => {
|
|
6250
|
+
const rowid = getRowid($xeTable, row);
|
|
6251
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
6252
|
+
if (rowRest) {
|
|
6253
|
+
rowRest.treeLoaded = false;
|
|
6254
|
+
if (treeExpandedMaps[rowid]) {
|
|
6255
|
+
delete treeExpandedMaps[rowid];
|
|
6256
|
+
}
|
|
6257
|
+
}
|
|
6258
|
+
});
|
|
6252
6259
|
}
|
|
6253
6260
|
if (transform) {
|
|
6254
6261
|
this.handleVirtualTreeToList();
|
|
@@ -7371,7 +7378,7 @@ const Methods = {
|
|
|
7371
7378
|
}
|
|
7372
7379
|
};
|
|
7373
7380
|
// Module methods
|
|
7374
|
-
const funcs = 'setFilter,openFilter,clearFilter,saveFilterPanel,resetFilterPanel,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,fullValidateField,validateField,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom,saveCustom,cancelCustom,resetCustom,toggleCustomAllCheckbox,setCustomAllCheckbox'.split(',');
|
|
7381
|
+
const funcs = 'setFilter,openFilter,clearFilter,saveFilterPanel,resetFilterPanel,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,insertChild,insertChildAt,insertChildNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,fullValidateField,validateField,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom,saveCustom,cancelCustom,resetCustom,toggleCustomAllCheckbox,setCustomAllCheckbox'.split(',');
|
|
7375
7382
|
funcs.forEach(name => {
|
|
7376
7383
|
Methods[name] = function (...args) {
|
|
7377
7384
|
if (process.env.NODE_ENV === 'development') {
|
package/es/table/style.css
CHANGED
|
@@ -1772,22 +1772,6 @@
|
|
|
1772
1772
|
.vxe-footer--column.fixed--width > .vxe-cell .vxe-ico-picker {
|
|
1773
1773
|
width: 100%;
|
|
1774
1774
|
}
|
|
1775
|
-
.vxe-header--column.fixed--width > .vxe-cell .vxe-cell--tree-node .vxe-input,
|
|
1776
|
-
.vxe-header--column.fixed--width > .vxe-cell .vxe-cell--tree-node .vxe-textarea,
|
|
1777
|
-
.vxe-header--column.fixed--width > .vxe-cell .vxe-cell--tree-node .vxe-select,
|
|
1778
|
-
.vxe-header--column.fixed--width > .vxe-cell .vxe-cell--tree-node .vxe-tree-select,
|
|
1779
|
-
.vxe-header--column.fixed--width > .vxe-cell .vxe-cell--tree-node .vxe-date-picker,
|
|
1780
|
-
.vxe-header--column.fixed--width > .vxe-cell .vxe-cell--tree-node .vxe-number-input,
|
|
1781
|
-
.vxe-header--column.fixed--width > .vxe-cell .vxe-cell--tree-node .vxe-ico-picker,
|
|
1782
|
-
.vxe-footer--column.fixed--width > .vxe-cell .vxe-cell--tree-node .vxe-input,
|
|
1783
|
-
.vxe-footer--column.fixed--width > .vxe-cell .vxe-cell--tree-node .vxe-textarea,
|
|
1784
|
-
.vxe-footer--column.fixed--width > .vxe-cell .vxe-cell--tree-node .vxe-select,
|
|
1785
|
-
.vxe-footer--column.fixed--width > .vxe-cell .vxe-cell--tree-node .vxe-tree-select,
|
|
1786
|
-
.vxe-footer--column.fixed--width > .vxe-cell .vxe-cell--tree-node .vxe-date-picker,
|
|
1787
|
-
.vxe-footer--column.fixed--width > .vxe-cell .vxe-cell--tree-node .vxe-number-input,
|
|
1788
|
-
.vxe-footer--column.fixed--width > .vxe-cell .vxe-cell--tree-node .vxe-ico-picker {
|
|
1789
|
-
width: 100%;
|
|
1790
|
-
}
|
|
1791
1775
|
|
|
1792
1776
|
.vxe-body--column.fixed--width > .vxe-cell > .vxe-default-input, .vxe-body--column.fixed--width > .vxe-cell > .vxe-default-textarea, .vxe-body--column.fixed--width > .vxe-cell > .vxe-default-select {
|
|
1793
1777
|
width: 100%;
|
|
@@ -1795,6 +1779,9 @@
|
|
|
1795
1779
|
.vxe-body--column.fixed--width > .vxe-cell > .vxe-input, .vxe-body--column.fixed--width > .vxe-cell > .vxe-textarea, .vxe-body--column.fixed--width > .vxe-cell > .vxe-select, .vxe-body--column.fixed--width > .vxe-cell > .vxe-tree-select, .vxe-body--column.fixed--width > .vxe-cell > .vxe-date-picker, .vxe-body--column.fixed--width > .vxe-cell > .vxe-number-input, .vxe-body--column.fixed--width > .vxe-cell > .vxe-ico-picker {
|
|
1796
1780
|
width: 100%;
|
|
1797
1781
|
}
|
|
1782
|
+
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--tree-node .vxe-default-input,
|
|
1783
|
+
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--tree-node .vxe-default-textarea,
|
|
1784
|
+
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--tree-node .vxe-default-select,
|
|
1798
1785
|
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--tree-node .vxe-input,
|
|
1799
1786
|
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--tree-node .vxe-textarea,
|
|
1800
1787
|
.vxe-body--column.fixed--width > .vxe-cell > .vxe-cell--tree-node .vxe-select,
|
|
@@ -1811,15 +1798,6 @@
|
|
|
1811
1798
|
.vxe-table--filter-template > .vxe-input, .vxe-table--filter-template > .vxe-textarea, .vxe-table--filter-template > .vxe-select, .vxe-table--filter-template > .vxe-tree-select, .vxe-table--filter-template > .vxe-date-picker, .vxe-table--filter-template > .vxe-number-input, .vxe-table--filter-template > .vxe-ico-picker {
|
|
1812
1799
|
width: 100%;
|
|
1813
1800
|
}
|
|
1814
|
-
.vxe-table--filter-template > .vxe-cell--tree-node .vxe-input,
|
|
1815
|
-
.vxe-table--filter-template > .vxe-cell--tree-node .vxe-textarea,
|
|
1816
|
-
.vxe-table--filter-template > .vxe-cell--tree-node .vxe-select,
|
|
1817
|
-
.vxe-table--filter-template > .vxe-cell--tree-node .vxe-tree-select,
|
|
1818
|
-
.vxe-table--filter-template > .vxe-cell--tree-node .vxe-date-picker,
|
|
1819
|
-
.vxe-table--filter-template > .vxe-cell--tree-node .vxe-number-input,
|
|
1820
|
-
.vxe-table--filter-template > .vxe-cell--tree-node .vxe-ico-picker {
|
|
1821
|
-
width: 100%;
|
|
1822
|
-
}
|
|
1823
1801
|
|
|
1824
1802
|
.vxe-cell .vxe-default-input,
|
|
1825
1803
|
.vxe-cell .vxe-default-textarea,
|