vxe-table 3.13.0-beta.10 → 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 +19 -44
- 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 +39 -94
- 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 +19 -47
- 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 +21 -53
- 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.1739790201341.ttf → iconfont.1739506361723.ttf} +0 -0
- /package/es/{iconfont.1739790201341.woff → iconfont.1739506361723.woff} +0 -0
- /package/es/{iconfont.1739790201341.woff2 → iconfont.1739506361723.woff2} +0 -0
- /package/lib/{iconfont.1739790201341.ttf → iconfont.1739506361723.ttf} +0 -0
- /package/lib/{iconfont.1739790201341.woff → iconfont.1739506361723.woff} +0 -0
- /package/lib/{iconfont.1739790201341.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) {
|
|
@@ -1637,7 +1638,6 @@ function handleColumn($xeTable, collectColumn) {
|
|
|
1637
1638
|
const $xeToolbar = $xeTable.$refs.$xeToolbar;
|
|
1638
1639
|
const reactData = $xeTable;
|
|
1639
1640
|
const internalData = $xeTable;
|
|
1640
|
-
const expandOpts = $xeTable.computeExpandOpts;
|
|
1641
1641
|
internalData.collectColumn = collectColumn;
|
|
1642
1642
|
const tableFullColumn = getColumnList(collectColumn);
|
|
1643
1643
|
internalData.tableFullColumn = tableFullColumn;
|
|
@@ -1645,7 +1645,6 @@ function handleColumn($xeTable, collectColumn) {
|
|
|
1645
1645
|
reactData.isDragColMove = false;
|
|
1646
1646
|
initColumnSort($xeTable);
|
|
1647
1647
|
return Promise.resolve(restoreCustomStorage($xeTable)).then(() => {
|
|
1648
|
-
const { scrollXLoad, scrollYLoad, expandColumn } = reactData;
|
|
1649
1648
|
cacheColumnMap($xeTable);
|
|
1650
1649
|
parseColumns($xeTable, true).then(() => {
|
|
1651
1650
|
if (reactData.scrollXLoad) {
|
|
@@ -1655,8 +1654,10 @@ function handleColumn($xeTable, collectColumn) {
|
|
|
1655
1654
|
$xeTable.clearMergeCells();
|
|
1656
1655
|
$xeTable.clearMergeFooterItems();
|
|
1657
1656
|
$xeTable.handleTableData(true);
|
|
1658
|
-
if (
|
|
1659
|
-
|
|
1657
|
+
if (process.env.NODE_ENV === 'development') {
|
|
1658
|
+
if ((reactData.scrollXLoad || reactData.scrollYLoad) && reactData.expandColumn) {
|
|
1659
|
+
warnLog('vxe.error.scrollErrProp', ['column.type=expand']);
|
|
1660
|
+
}
|
|
1660
1661
|
}
|
|
1661
1662
|
return $xeTable.$nextTick().then(() => {
|
|
1662
1663
|
if ($xeToolbar) {
|
|
@@ -1928,15 +1929,6 @@ function updateRowExpandStyle($xeTable) {
|
|
|
1928
1929
|
}
|
|
1929
1930
|
}
|
|
1930
1931
|
}
|
|
1931
|
-
function handleRowExpandScroll($xeTable) {
|
|
1932
|
-
const internalData = $xeTable;
|
|
1933
|
-
const { elemStore } = internalData;
|
|
1934
|
-
const rowExpandEl = $xeTable.$refs.refRowExpandElem;
|
|
1935
|
-
const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
|
|
1936
|
-
if (rowExpandEl && bodyScrollElem) {
|
|
1937
|
-
rowExpandEl.scrollTop = bodyScrollElem.scrollTop;
|
|
1938
|
-
}
|
|
1939
|
-
}
|
|
1940
1932
|
const Methods = {
|
|
1941
1933
|
callSlot(slotFunc, params, h, vNodes) {
|
|
1942
1934
|
if (slotFunc) {
|
|
@@ -5525,7 +5517,7 @@ const Methods = {
|
|
|
5525
5517
|
}
|
|
5526
5518
|
vLen++;
|
|
5527
5519
|
});
|
|
5528
|
-
const isSelected =
|
|
5520
|
+
const isSelected = vLen > 0 ? sLen >= vLen : sLen >= rootList.length;
|
|
5529
5521
|
const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
|
|
5530
5522
|
reactData.isAllSelected = isSelected;
|
|
5531
5523
|
reactData.isIndeterminate = halfSelect;
|
|
@@ -7282,10 +7274,7 @@ const Methods = {
|
|
|
7282
7274
|
delete rExpandLazyLoadedMaps[rowid];
|
|
7283
7275
|
}
|
|
7284
7276
|
reactData.rowExpandLazyLoadedMaps = rExpandLazyLoadedMaps;
|
|
7285
|
-
$xeTable.$nextTick()
|
|
7286
|
-
.then(() => $xeTable.recalculate())
|
|
7287
|
-
.then(() => $xeTable.updateCellAreas())
|
|
7288
|
-
.then(() => resolve());
|
|
7277
|
+
$xeTable.$nextTick().then(() => $xeTable.recalculate()).then(() => resolve());
|
|
7289
7278
|
});
|
|
7290
7279
|
}
|
|
7291
7280
|
else {
|
|
@@ -7301,13 +7290,12 @@ const Methods = {
|
|
|
7301
7290
|
* @param {Boolean} expanded 是否展开
|
|
7302
7291
|
*/
|
|
7303
7292
|
setRowExpand(rows, expanded) {
|
|
7304
|
-
const
|
|
7305
|
-
const { rowExpandedMaps, fullAllDataRowIdData, rowExpandLazyLoadedMaps, expandOpts, expandColumn } = this;
|
|
7293
|
+
const { rowExpandedMaps, fullAllDataRowIdData, rowExpandLazyLoadedMaps, expandOpts, expandColumn: column } = this;
|
|
7306
7294
|
let rExpandedMaps = Object.assign({}, rowExpandedMaps);
|
|
7307
7295
|
const { reserve, lazy, accordion, toggleMethod } = expandOpts;
|
|
7308
7296
|
const lazyRests = [];
|
|
7309
|
-
const columnIndex = this.getColumnIndex(
|
|
7310
|
-
const $columnIndex = this.getVMColumnIndex(
|
|
7297
|
+
const columnIndex = this.getColumnIndex(column);
|
|
7298
|
+
const $columnIndex = this.getVMColumnIndex(column);
|
|
7311
7299
|
if (rows) {
|
|
7312
7300
|
if (!XEUtils.isArray(rows)) {
|
|
7313
7301
|
rows = [rows];
|
|
@@ -7317,7 +7305,7 @@ const Methods = {
|
|
|
7317
7305
|
rExpandedMaps = {};
|
|
7318
7306
|
rows = rows.slice(rows.length - 1, rows.length);
|
|
7319
7307
|
}
|
|
7320
|
-
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;
|
|
7321
7309
|
if (expanded) {
|
|
7322
7310
|
validRows.forEach((row) => {
|
|
7323
7311
|
const rowid = getRowid(this, row);
|
|
@@ -7346,15 +7334,7 @@ const Methods = {
|
|
|
7346
7334
|
}
|
|
7347
7335
|
}
|
|
7348
7336
|
this.rowExpandedMaps = rExpandedMaps;
|
|
7349
|
-
return Promise.all(lazyRests)
|
|
7350
|
-
.then(() => $xeTable.recalculate())
|
|
7351
|
-
.then(() => {
|
|
7352
|
-
if (expandColumn) {
|
|
7353
|
-
updateRowExpandStyle($xeTable);
|
|
7354
|
-
handleRowExpandScroll($xeTable);
|
|
7355
|
-
}
|
|
7356
|
-
return $xeTable.updateCellAreas();
|
|
7357
|
-
});
|
|
7337
|
+
return Promise.all(lazyRests).then(this.recalculate);
|
|
7358
7338
|
},
|
|
7359
7339
|
/**
|
|
7360
7340
|
* 判断行是否为展开状态
|
|
@@ -7376,7 +7356,6 @@ const Methods = {
|
|
|
7376
7356
|
* 手动清空展开行状态,数据会恢复成未展开的状态
|
|
7377
7357
|
*/
|
|
7378
7358
|
clearRowExpand() {
|
|
7379
|
-
const $xeTable = this;
|
|
7380
7359
|
const { expandOpts, tableFullData } = this;
|
|
7381
7360
|
const { reserve } = expandOpts;
|
|
7382
7361
|
const expList = this.getRowExpandRecords();
|
|
@@ -7388,7 +7367,7 @@ const Methods = {
|
|
|
7388
7367
|
if (expList.length) {
|
|
7389
7368
|
this.recalculate();
|
|
7390
7369
|
}
|
|
7391
|
-
})
|
|
7370
|
+
});
|
|
7392
7371
|
},
|
|
7393
7372
|
clearRowExpandReserve() {
|
|
7394
7373
|
this.rowExpandedReserveRowMap = {};
|
|
@@ -8665,14 +8644,10 @@ const Methods = {
|
|
|
8665
8644
|
}
|
|
8666
8645
|
},
|
|
8667
8646
|
updateCellAreas() {
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
const { mouseConfig } = props;
|
|
8671
|
-
const mouseOpts = $xeTable.computeMouseOpts;
|
|
8672
|
-
if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
|
|
8673
|
-
return $xeTable.handleRecalculateCellAreaEvent();
|
|
8647
|
+
if (this.mouseConfig && this.mouseOpts.area && this.handleRecalculateCellAreas) {
|
|
8648
|
+
return this.handleRecalculateCellAreas();
|
|
8674
8649
|
}
|
|
8675
|
-
return
|
|
8650
|
+
return this.$nextTick();
|
|
8676
8651
|
},
|
|
8677
8652
|
dispatchEvent(type, params, evnt) {
|
|
8678
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(() => {
|