vxe-table 3.13.0-beta.11 → 3.13.0-beta.2
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 +8 -1
- package/es/table/render/index.js +0 -10
- package/es/table/src/body.js +2 -4
- package/es/table/src/cell.js +0 -3
- package/es/table/src/footer.js +2 -4
- package/es/table/src/header.js +4 -6
- package/es/table/src/methods.js +21 -50
- package/es/table/src/table.js +3 -13
- package/es/table/style.css +1 -1
- 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 +1 -1
- 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 +41 -102
- 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 +10 -1
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/render/index.js +0 -10
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +1 -4
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +0 -3
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/footer.js +1 -4
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +3 -6
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +21 -55
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +3 -17
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +1 -1
- 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 +1 -1
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/table/module/edit/mixin.ts +8 -1
- package/packages/table/render/index.ts +0 -10
- package/packages/table/src/body.ts +2 -5
- package/packages/table/src/cell.ts +1 -4
- package/packages/table/src/footer.ts +2 -5
- package/packages/table/src/header.ts +4 -7
- package/packages/table/src/methods.ts +23 -59
- package/packages/table/src/table.ts +3 -14
- package/styles/components/table.scss +1 -1
- package/es/locale/lang/id-ID.js +0 -695
- package/lib/locale/lang/id-ID.js +0 -701
- package/lib/locale/lang/id-ID.min.js +0 -1
- package/packages/locale/lang/id-ID.ts +0 -695
- /package/es/{iconfont.1739840910920.ttf → iconfont.1739506361723.ttf} +0 -0
- /package/es/{iconfont.1739840910920.woff → iconfont.1739506361723.woff} +0 -0
- /package/es/{iconfont.1739840910920.woff2 → iconfont.1739506361723.woff2} +0 -0
- /package/lib/{iconfont.1739840910920.ttf → iconfont.1739506361723.ttf} +0 -0
- /package/lib/{iconfont.1739840910920.woff → iconfont.1739506361723.woff} +0 -0
- /package/lib/{iconfont.1739840910920.woff2 → iconfont.1739506361723.woff2} +0 -0
package/es/table/src/body.js
CHANGED
|
@@ -611,7 +611,7 @@ export default {
|
|
|
611
611
|
const { xID, $scopedSlots } = $xeTable;
|
|
612
612
|
const { fixedColumn, fixedType, tableColumn } = props;
|
|
613
613
|
const { spanMethod, footerSpanMethod, mouseConfig } = tableProps;
|
|
614
|
-
const { isGroup, tableData, isRowLoading, isColLoading,
|
|
614
|
+
const { isGroup, tableData, isRowLoading, isColLoading, scrollXLoad, scrollYLoad, isAllOverflow, isDragRowMove, expandColumn, dragRow, dragCol } = tableReactData;
|
|
615
615
|
const { visibleColumn, fullAllDataRowIdData, fullColumnIdData } = tableInternalData;
|
|
616
616
|
const rowOpts = $xeTable.computeRowOpts;
|
|
617
617
|
const emptyOpts = $xeTable.computeEmptyOpts;
|
|
@@ -630,10 +630,8 @@ export default {
|
|
|
630
630
|
isOptimizeMode = true;
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
|
-
if (fixedType || !overflowX) {
|
|
634
|
-
renderColumnList = visibleColumn;
|
|
635
|
-
}
|
|
636
633
|
if (fixedType) {
|
|
634
|
+
renderColumnList = visibleColumn;
|
|
637
635
|
if (isOptimizeMode) {
|
|
638
636
|
renderColumnList = fixedColumn || [];
|
|
639
637
|
}
|
package/es/table/src/cell.js
CHANGED
package/es/table/src/footer.js
CHANGED
|
@@ -288,7 +288,7 @@ export default {
|
|
|
288
288
|
const { fixedType, fixedColumn, tableColumn } = props;
|
|
289
289
|
const { spanMethod, footerSpanMethod, showFooterOverflow: allColumnFooterOverflow } = tableProps;
|
|
290
290
|
const { visibleColumn, fullColumnIdData } = tableInternalData;
|
|
291
|
-
const { isGroup,
|
|
291
|
+
const { isGroup, scrollXLoad, scrollYLoad, dragCol } = tableReactData;
|
|
292
292
|
let renderColumnList = tableColumn;
|
|
293
293
|
let isOptimizeMode = false;
|
|
294
294
|
// 如果是使用优化模式
|
|
@@ -300,10 +300,8 @@ export default {
|
|
|
300
300
|
isOptimizeMode = true;
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
-
if (fixedType || !overflowX) {
|
|
304
|
-
renderColumnList = visibleColumn;
|
|
305
|
-
}
|
|
306
303
|
if (fixedType) {
|
|
304
|
+
renderColumnList = visibleColumn;
|
|
307
305
|
if (isOptimizeMode) {
|
|
308
306
|
renderColumnList = fixedColumn || [];
|
|
309
307
|
}
|
package/es/table/src/header.js
CHANGED
|
@@ -107,8 +107,8 @@ const renderRows = (h, _vm, isGroup, isOptimizeMode, cols, $rowIndex) => {
|
|
|
107
107
|
'is--sortable': column.sortable,
|
|
108
108
|
'col--filter': !!filters,
|
|
109
109
|
'is--filter-active': hasFilter,
|
|
110
|
-
'is--drag-active':
|
|
111
|
-
'is--drag-disabled':
|
|
110
|
+
'is--drag-active': !column.fixed && !isDisabledDrag && (isCrossDrag || isPeerDrag || !column.parentId),
|
|
111
|
+
'is--drag-disabled': isDisabledDrag,
|
|
112
112
|
'col--current': currentColumn === column
|
|
113
113
|
}, getClass(headerClassName, cellParams), getClass(headerCellClassName, cellParams)],
|
|
114
114
|
attrs: thAttrs,
|
|
@@ -252,7 +252,7 @@ export default {
|
|
|
252
252
|
const { fixedType, fixedColumn, tableColumn } = props;
|
|
253
253
|
const { headerColumn } = this;
|
|
254
254
|
const { mouseConfig, showHeaderOverflow: allColumnHeaderOverflow, spanMethod, footerSpanMethod } = tableProps;
|
|
255
|
-
const { isGroup,
|
|
255
|
+
const { isGroup, scrollXLoad, scrollYLoad, dragCol } = tableReactData;
|
|
256
256
|
const { visibleColumn, fullColumnIdData } = tableInternalData;
|
|
257
257
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
258
258
|
let renderHeaderList = headerColumn;
|
|
@@ -271,10 +271,8 @@ export default {
|
|
|
271
271
|
isOptimizeMode = true;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
if (fixedType || !overflowX) {
|
|
275
|
-
renderColumnList = visibleColumn;
|
|
276
|
-
}
|
|
277
274
|
if (fixedType) {
|
|
275
|
+
renderColumnList = visibleColumn;
|
|
278
276
|
// 如果是使用优化模式
|
|
279
277
|
if (isOptimizeMode) {
|
|
280
278
|
renderColumnList = fixedColumn || [];
|
package/es/table/src/methods.js
CHANGED
|
@@ -172,7 +172,6 @@ function cacheColumnMap($xeTable) {
|
|
|
172
172
|
const fullColumnIdData = internalData.fullColumnIdData = {};
|
|
173
173
|
const fullColumnFieldData = internalData.fullColumnFieldData = {};
|
|
174
174
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
175
|
-
const expandOpts = $xeTable.computeExpandOpts;
|
|
176
175
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
177
176
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
178
177
|
const { isCrossDrag, isSelfToChildDrag } = columnDragOpts;
|
|
@@ -262,8 +261,10 @@ function cacheColumnMap($xeTable) {
|
|
|
262
261
|
else {
|
|
263
262
|
tableFullColumn.forEach(handleFunc);
|
|
264
263
|
}
|
|
265
|
-
if (
|
|
266
|
-
|
|
264
|
+
if (process.env.NODE_ENV === 'development') {
|
|
265
|
+
if (expandColumn && mouseOpts.area) {
|
|
266
|
+
errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand']);
|
|
267
|
+
}
|
|
267
268
|
}
|
|
268
269
|
if (process.env.NODE_ENV === 'developmeznt') {
|
|
269
270
|
if (htmlColumn) {
|
|
@@ -295,9 +296,7 @@ const updateScrollYStatus = ($xeTable, fullData) => {
|
|
|
295
296
|
return scrollYLoad;
|
|
296
297
|
};
|
|
297
298
|
function updateAfterListIndex($xeTable) {
|
|
298
|
-
const props = $xeTable;
|
|
299
299
|
const internalData = $xeTable;
|
|
300
|
-
const { treeConfig } = props;
|
|
301
300
|
const { afterFullData, fullDataRowIdData, fullAllDataRowIdData } = internalData;
|
|
302
301
|
const fullMaps = {};
|
|
303
302
|
afterFullData.forEach((row, index) => {
|
|
@@ -305,9 +304,7 @@ function updateAfterListIndex($xeTable) {
|
|
|
305
304
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
306
305
|
const seq = index + 1;
|
|
307
306
|
if (rowRest) {
|
|
308
|
-
|
|
309
|
-
rowRest.seq = seq;
|
|
310
|
-
}
|
|
307
|
+
rowRest.seq = seq;
|
|
311
308
|
rowRest._index = index;
|
|
312
309
|
}
|
|
313
310
|
else {
|
|
@@ -1641,7 +1638,6 @@ function handleColumn($xeTable, collectColumn) {
|
|
|
1641
1638
|
const $xeToolbar = $xeTable.$refs.$xeToolbar;
|
|
1642
1639
|
const reactData = $xeTable;
|
|
1643
1640
|
const internalData = $xeTable;
|
|
1644
|
-
const expandOpts = $xeTable.computeExpandOpts;
|
|
1645
1641
|
internalData.collectColumn = collectColumn;
|
|
1646
1642
|
const tableFullColumn = getColumnList(collectColumn);
|
|
1647
1643
|
internalData.tableFullColumn = tableFullColumn;
|
|
@@ -1649,7 +1645,6 @@ function handleColumn($xeTable, collectColumn) {
|
|
|
1649
1645
|
reactData.isDragColMove = false;
|
|
1650
1646
|
initColumnSort($xeTable);
|
|
1651
1647
|
return Promise.resolve(restoreCustomStorage($xeTable)).then(() => {
|
|
1652
|
-
const { scrollXLoad, scrollYLoad, expandColumn } = reactData;
|
|
1653
1648
|
cacheColumnMap($xeTable);
|
|
1654
1649
|
parseColumns($xeTable, true).then(() => {
|
|
1655
1650
|
if (reactData.scrollXLoad) {
|
|
@@ -1659,8 +1654,10 @@ function handleColumn($xeTable, collectColumn) {
|
|
|
1659
1654
|
$xeTable.clearMergeCells();
|
|
1660
1655
|
$xeTable.clearMergeFooterItems();
|
|
1661
1656
|
$xeTable.handleTableData(true);
|
|
1662
|
-
if (
|
|
1663
|
-
|
|
1657
|
+
if (process.env.NODE_ENV === 'development') {
|
|
1658
|
+
if ((reactData.scrollXLoad || reactData.scrollYLoad) && reactData.expandColumn) {
|
|
1659
|
+
warnLog('vxe.error.scrollErrProp', ['column.type=expand']);
|
|
1660
|
+
}
|
|
1664
1661
|
}
|
|
1665
1662
|
return $xeTable.$nextTick().then(() => {
|
|
1666
1663
|
if ($xeToolbar) {
|
|
@@ -1932,15 +1929,6 @@ function updateRowExpandStyle($xeTable) {
|
|
|
1932
1929
|
}
|
|
1933
1930
|
}
|
|
1934
1931
|
}
|
|
1935
|
-
function handleRowExpandScroll($xeTable) {
|
|
1936
|
-
const internalData = $xeTable;
|
|
1937
|
-
const { elemStore } = internalData;
|
|
1938
|
-
const rowExpandEl = $xeTable.$refs.refRowExpandElem;
|
|
1939
|
-
const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
|
|
1940
|
-
if (rowExpandEl && bodyScrollElem) {
|
|
1941
|
-
rowExpandEl.scrollTop = bodyScrollElem.scrollTop;
|
|
1942
|
-
}
|
|
1943
|
-
}
|
|
1944
1932
|
const Methods = {
|
|
1945
1933
|
callSlot(slotFunc, params, h, vNodes) {
|
|
1946
1934
|
if (slotFunc) {
|
|
@@ -5452,7 +5440,7 @@ const Methods = {
|
|
|
5452
5440
|
const isSelected = sLen >= vLen;
|
|
5453
5441
|
const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
|
|
5454
5442
|
if (checkField) {
|
|
5455
|
-
XEUtils.
|
|
5443
|
+
XEUtils.get(row, checkField, isSelected);
|
|
5456
5444
|
}
|
|
5457
5445
|
if (isSelected) {
|
|
5458
5446
|
if (!checkField) {
|
|
@@ -5529,7 +5517,7 @@ const Methods = {
|
|
|
5529
5517
|
}
|
|
5530
5518
|
vLen++;
|
|
5531
5519
|
});
|
|
5532
|
-
const isSelected =
|
|
5520
|
+
const isSelected = vLen > 0 ? sLen >= vLen : sLen >= rootList.length;
|
|
5533
5521
|
const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
|
|
5534
5522
|
reactData.isAllSelected = isSelected;
|
|
5535
5523
|
reactData.isIndeterminate = halfSelect;
|
|
@@ -7286,10 +7274,7 @@ const Methods = {
|
|
|
7286
7274
|
delete rExpandLazyLoadedMaps[rowid];
|
|
7287
7275
|
}
|
|
7288
7276
|
reactData.rowExpandLazyLoadedMaps = rExpandLazyLoadedMaps;
|
|
7289
|
-
$xeTable.$nextTick()
|
|
7290
|
-
.then(() => $xeTable.recalculate())
|
|
7291
|
-
.then(() => $xeTable.updateCellAreas())
|
|
7292
|
-
.then(() => resolve());
|
|
7277
|
+
$xeTable.$nextTick().then(() => $xeTable.recalculate()).then(() => resolve());
|
|
7293
7278
|
});
|
|
7294
7279
|
}
|
|
7295
7280
|
else {
|
|
@@ -7305,13 +7290,12 @@ const Methods = {
|
|
|
7305
7290
|
* @param {Boolean} expanded 是否展开
|
|
7306
7291
|
*/
|
|
7307
7292
|
setRowExpand(rows, expanded) {
|
|
7308
|
-
const
|
|
7309
|
-
const { rowExpandedMaps, fullAllDataRowIdData, rowExpandLazyLoadedMaps, expandOpts, expandColumn } = this;
|
|
7293
|
+
const { rowExpandedMaps, fullAllDataRowIdData, rowExpandLazyLoadedMaps, expandOpts, expandColumn: column } = this;
|
|
7310
7294
|
let rExpandedMaps = Object.assign({}, rowExpandedMaps);
|
|
7311
7295
|
const { reserve, lazy, accordion, toggleMethod } = expandOpts;
|
|
7312
7296
|
const lazyRests = [];
|
|
7313
|
-
const columnIndex =
|
|
7314
|
-
const $columnIndex =
|
|
7297
|
+
const columnIndex = this.getColumnIndex(column);
|
|
7298
|
+
const $columnIndex = this.getVMColumnIndex(column);
|
|
7315
7299
|
if (rows) {
|
|
7316
7300
|
if (!XEUtils.isArray(rows)) {
|
|
7317
7301
|
rows = [rows];
|
|
@@ -7321,7 +7305,7 @@ const Methods = {
|
|
|
7321
7305
|
rExpandedMaps = {};
|
|
7322
7306
|
rows = rows.slice(rows.length - 1, rows.length);
|
|
7323
7307
|
}
|
|
7324
|
-
const validRows = toggleMethod ? rows.filter((row) => toggleMethod({ expanded, column
|
|
7308
|
+
const validRows = toggleMethod ? rows.filter((row) => toggleMethod({ expanded, column, columnIndex, $columnIndex, row, rowIndex: this.getRowIndex(row), $rowIndex: this.getVMRowIndex(row) })) : rows;
|
|
7325
7309
|
if (expanded) {
|
|
7326
7310
|
validRows.forEach((row) => {
|
|
7327
7311
|
const rowid = getRowid(this, row);
|
|
@@ -7350,15 +7334,7 @@ const Methods = {
|
|
|
7350
7334
|
}
|
|
7351
7335
|
}
|
|
7352
7336
|
this.rowExpandedMaps = rExpandedMaps;
|
|
7353
|
-
return Promise.all(lazyRests)
|
|
7354
|
-
.then(() => $xeTable.recalculate())
|
|
7355
|
-
.then(() => {
|
|
7356
|
-
if (expandColumn) {
|
|
7357
|
-
updateRowExpandStyle($xeTable);
|
|
7358
|
-
handleRowExpandScroll($xeTable);
|
|
7359
|
-
}
|
|
7360
|
-
return $xeTable.updateCellAreas();
|
|
7361
|
-
});
|
|
7337
|
+
return Promise.all(lazyRests).then(this.recalculate);
|
|
7362
7338
|
},
|
|
7363
7339
|
/**
|
|
7364
7340
|
* 判断行是否为展开状态
|
|
@@ -7380,7 +7356,6 @@ const Methods = {
|
|
|
7380
7356
|
* 手动清空展开行状态,数据会恢复成未展开的状态
|
|
7381
7357
|
*/
|
|
7382
7358
|
clearRowExpand() {
|
|
7383
|
-
const $xeTable = this;
|
|
7384
7359
|
const { expandOpts, tableFullData } = this;
|
|
7385
7360
|
const { reserve } = expandOpts;
|
|
7386
7361
|
const expList = this.getRowExpandRecords();
|
|
@@ -7392,7 +7367,7 @@ const Methods = {
|
|
|
7392
7367
|
if (expList.length) {
|
|
7393
7368
|
this.recalculate();
|
|
7394
7369
|
}
|
|
7395
|
-
})
|
|
7370
|
+
});
|
|
7396
7371
|
},
|
|
7397
7372
|
clearRowExpandReserve() {
|
|
7398
7373
|
this.rowExpandedReserveRowMap = {};
|
|
@@ -8669,14 +8644,10 @@ const Methods = {
|
|
|
8669
8644
|
}
|
|
8670
8645
|
},
|
|
8671
8646
|
updateCellAreas() {
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
const { mouseConfig } = props;
|
|
8675
|
-
const mouseOpts = $xeTable.computeMouseOpts;
|
|
8676
|
-
if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
|
|
8677
|
-
return $xeTable.handleRecalculateCellAreaEvent();
|
|
8647
|
+
if (this.mouseConfig && this.mouseOpts.area && this.handleRecalculateCellAreas) {
|
|
8648
|
+
return this.handleRecalculateCellAreas();
|
|
8678
8649
|
}
|
|
8679
|
-
return
|
|
8650
|
+
return this.$nextTick();
|
|
8680
8651
|
},
|
|
8681
8652
|
dispatchEvent(type, params, evnt) {
|
|
8682
8653
|
const $xeTable = this;
|
package/es/table/src/table.js
CHANGED
|
@@ -1114,15 +1114,11 @@ export default {
|
|
|
1114
1114
|
} }),
|
|
1115
1115
|
watch: {
|
|
1116
1116
|
data(value) {
|
|
1117
|
-
const $xeTable = this;
|
|
1118
|
-
const reactData = $xeTable;
|
|
1119
1117
|
const { initStatus } = this;
|
|
1120
1118
|
if (value && value.length >= 50000) {
|
|
1121
1119
|
warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)']);
|
|
1122
1120
|
}
|
|
1123
1121
|
this.loadTableData(value || [], true).then(() => {
|
|
1124
|
-
const { scrollXLoad, scrollYLoad, expandColumn } = reactData;
|
|
1125
|
-
const expandOpts = $xeTable.computeExpandOpts;
|
|
1126
1122
|
this.inited = true;
|
|
1127
1123
|
this.initStatus = true;
|
|
1128
1124
|
if (!initStatus) {
|
|
@@ -1132,9 +1128,9 @@ export default {
|
|
|
1132
1128
|
// if (checkboxColumn && this.tableFullData.length > 300 && !this.checkboxOpts.checkField) {
|
|
1133
1129
|
// warnLog('vxe.error.checkProp', ['checkbox-config.checkField'])
|
|
1134
1130
|
// }
|
|
1135
|
-
if ((scrollXLoad || scrollYLoad) &&
|
|
1136
|
-
|
|
1137
|
-
}
|
|
1131
|
+
// if ((this.scrollXLoad || this.scrollYLoad) && this.expandColumn) {
|
|
1132
|
+
// warnLog('vxe.error.scrollErrProp', ['column.type=expand'])
|
|
1133
|
+
// }
|
|
1138
1134
|
this.recalculate();
|
|
1139
1135
|
});
|
|
1140
1136
|
},
|
|
@@ -1159,12 +1155,6 @@ export default {
|
|
|
1159
1155
|
showFooter() {
|
|
1160
1156
|
this.reScrollFlag++;
|
|
1161
1157
|
},
|
|
1162
|
-
overflowX() {
|
|
1163
|
-
this.reScrollFlag++;
|
|
1164
|
-
},
|
|
1165
|
-
overflowY() {
|
|
1166
|
-
this.reScrollFlag++;
|
|
1167
|
-
},
|
|
1168
1158
|
reScrollFlag() {
|
|
1169
1159
|
const $xeTable = this;
|
|
1170
1160
|
$xeTable.$nextTick(() => {
|