vxe-table 4.11.0-beta.8 → 4.11.0
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/render/index.js +10 -0
- package/es/table/src/table.js +24 -7
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +40 -9
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/render/index.js +10 -0
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/table.js +28 -7
- package/lib/table/src/table.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/render/index.ts +10 -0
- package/packages/table/src/table.ts +25 -7
- /package/es/{iconfont.1739778419283.ttf → iconfont.1739842441645.ttf} +0 -0
- /package/es/{iconfont.1739778419283.woff → iconfont.1739842441645.woff} +0 -0
- /package/es/{iconfont.1739778419283.woff2 → iconfont.1739842441645.woff2} +0 -0
- /package/lib/{iconfont.1739778419283.ttf → iconfont.1739842441645.ttf} +0 -0
- /package/lib/{iconfont.1739778419283.woff → iconfont.1739842441645.woff} +0 -0
- /package/lib/{iconfont.1739778419283.woff2 → iconfont.1739842441645.woff2} +0 -0
package/es/table/src/table.js
CHANGED
|
@@ -1474,6 +1474,7 @@ export default defineComponent({
|
|
|
1474
1474
|
};
|
|
1475
1475
|
};
|
|
1476
1476
|
const updateAfterListIndex = () => {
|
|
1477
|
+
const { treeConfig } = props;
|
|
1477
1478
|
const { afterFullData, fullDataRowIdData, fullAllDataRowIdData } = internalData;
|
|
1478
1479
|
const fullMaps = {};
|
|
1479
1480
|
afterFullData.forEach((row, index) => {
|
|
@@ -1481,7 +1482,9 @@ export default defineComponent({
|
|
|
1481
1482
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
1482
1483
|
const seq = index + 1;
|
|
1483
1484
|
if (rowRest) {
|
|
1484
|
-
|
|
1485
|
+
if (!treeConfig) {
|
|
1486
|
+
rowRest.seq = seq;
|
|
1487
|
+
}
|
|
1485
1488
|
rowRest._index = index;
|
|
1486
1489
|
}
|
|
1487
1490
|
else {
|
|
@@ -3344,6 +3347,14 @@ export default defineComponent({
|
|
|
3344
3347
|
}
|
|
3345
3348
|
}
|
|
3346
3349
|
};
|
|
3350
|
+
const handleRowExpandScroll = () => {
|
|
3351
|
+
const { elemStore } = internalData;
|
|
3352
|
+
const rowExpandEl = refRowExpandElem.value;
|
|
3353
|
+
const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
|
|
3354
|
+
if (rowExpandEl && bodyScrollElem) {
|
|
3355
|
+
rowExpandEl.scrollTop = bodyScrollElem.scrollTop;
|
|
3356
|
+
}
|
|
3357
|
+
};
|
|
3347
3358
|
tableMethods = {
|
|
3348
3359
|
dispatchEvent,
|
|
3349
3360
|
/**
|
|
@@ -5078,14 +5089,14 @@ export default defineComponent({
|
|
|
5078
5089
|
* @param {Boolean} expanded 是否展开
|
|
5079
5090
|
*/
|
|
5080
5091
|
setRowExpand(rows, expanded) {
|
|
5081
|
-
const { rowExpandedMaps, rowExpandLazyLoadedMaps, expandColumn
|
|
5092
|
+
const { rowExpandedMaps, rowExpandLazyLoadedMaps, expandColumn } = reactData;
|
|
5082
5093
|
const { fullAllDataRowIdData } = internalData;
|
|
5083
5094
|
let rExpandedMaps = Object.assign({}, rowExpandedMaps);
|
|
5084
5095
|
const expandOpts = computeExpandOpts.value;
|
|
5085
5096
|
const { reserve, lazy, accordion, toggleMethod } = expandOpts;
|
|
5086
5097
|
const lazyRests = [];
|
|
5087
|
-
const columnIndex =
|
|
5088
|
-
const $columnIndex =
|
|
5098
|
+
const columnIndex = $xeTable.getColumnIndex(expandColumn);
|
|
5099
|
+
const $columnIndex = $xeTable.getVMColumnIndex(expandColumn);
|
|
5089
5100
|
if (rows) {
|
|
5090
5101
|
if (!XEUtils.isArray(rows)) {
|
|
5091
5102
|
rows = [rows];
|
|
@@ -5095,7 +5106,7 @@ export default defineComponent({
|
|
|
5095
5106
|
rExpandedMaps = {};
|
|
5096
5107
|
rows = rows.slice(rows.length - 1, rows.length);
|
|
5097
5108
|
}
|
|
5098
|
-
const validRows = toggleMethod ? rows.filter((row) => toggleMethod({ $table: $xeTable, expanded, column, columnIndex, $columnIndex, row, rowIndex: tableMethods.getRowIndex(row), $rowIndex: tableMethods.getVMRowIndex(row) })) : rows;
|
|
5109
|
+
const validRows = toggleMethod ? rows.filter((row) => toggleMethod({ $table: $xeTable, expanded, column: expandColumn, columnIndex, $columnIndex, row, rowIndex: tableMethods.getRowIndex(row), $rowIndex: tableMethods.getVMRowIndex(row) })) : rows;
|
|
5099
5110
|
if (expanded) {
|
|
5100
5111
|
validRows.forEach((row) => {
|
|
5101
5112
|
const rowid = getRowid($xeTable, row);
|
|
@@ -5126,7 +5137,13 @@ export default defineComponent({
|
|
|
5126
5137
|
reactData.rowExpandedMaps = rExpandedMaps;
|
|
5127
5138
|
return Promise.all(lazyRests)
|
|
5128
5139
|
.then(() => $xeTable.recalculate())
|
|
5129
|
-
.then(() =>
|
|
5140
|
+
.then(() => {
|
|
5141
|
+
if (expandColumn) {
|
|
5142
|
+
updateRowExpandStyle();
|
|
5143
|
+
handleRowExpandScroll();
|
|
5144
|
+
}
|
|
5145
|
+
return $xeTable.updateCellAreas();
|
|
5146
|
+
});
|
|
5130
5147
|
},
|
|
5131
5148
|
/**
|
|
5132
5149
|
* 判断行是否为展开状态
|
|
@@ -7208,7 +7225,7 @@ export default defineComponent({
|
|
|
7208
7225
|
const isSelected = sLen >= vLen;
|
|
7209
7226
|
const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
|
|
7210
7227
|
if (checkField) {
|
|
7211
|
-
XEUtils.
|
|
7228
|
+
XEUtils.set(row, checkField, isSelected);
|
|
7212
7229
|
}
|
|
7213
7230
|
if (isSelected) {
|
|
7214
7231
|
if (!checkField) {
|
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.11.0
|
|
3141
|
+
const version = "4.11.0";
|
|
3142
3142
|
core_.VxeUI.version = version;
|
|
3143
3143
|
core_.VxeUI.tableVersion = version;
|
|
3144
3144
|
core_.VxeUI.setConfig({
|
|
@@ -3586,7 +3586,7 @@ var esnext_iterator_some = __webpack_require__(7550);
|
|
|
3586
3586
|
const {
|
|
3587
3587
|
log: log_log
|
|
3588
3588
|
} = core_.VxeUI;
|
|
3589
|
-
const log_version = `table v${"4.11.0
|
|
3589
|
+
const log_version = `table v${"4.11.0"}`;
|
|
3590
3590
|
const warnLog = log_log.create('warn', log_version);
|
|
3591
3591
|
const errLog = log_log.create('error', log_version);
|
|
3592
3592
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -11975,6 +11975,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11975
11975
|
};
|
|
11976
11976
|
};
|
|
11977
11977
|
const updateAfterListIndex = () => {
|
|
11978
|
+
const {
|
|
11979
|
+
treeConfig
|
|
11980
|
+
} = props;
|
|
11978
11981
|
const {
|
|
11979
11982
|
afterFullData,
|
|
11980
11983
|
fullDataRowIdData,
|
|
@@ -11986,7 +11989,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11986
11989
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
11987
11990
|
const seq = index + 1;
|
|
11988
11991
|
if (rowRest) {
|
|
11989
|
-
|
|
11992
|
+
if (!treeConfig) {
|
|
11993
|
+
rowRest.seq = seq;
|
|
11994
|
+
}
|
|
11990
11995
|
rowRest._index = index;
|
|
11991
11996
|
} else {
|
|
11992
11997
|
const rest = {
|
|
@@ -14223,6 +14228,16 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14223
14228
|
}
|
|
14224
14229
|
}
|
|
14225
14230
|
};
|
|
14231
|
+
const handleRowExpandScroll = () => {
|
|
14232
|
+
const {
|
|
14233
|
+
elemStore
|
|
14234
|
+
} = internalData;
|
|
14235
|
+
const rowExpandEl = refRowExpandElem.value;
|
|
14236
|
+
const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
|
|
14237
|
+
if (rowExpandEl && bodyScrollElem) {
|
|
14238
|
+
rowExpandEl.scrollTop = bodyScrollElem.scrollTop;
|
|
14239
|
+
}
|
|
14240
|
+
};
|
|
14226
14241
|
tableMethods = {
|
|
14227
14242
|
dispatchEvent,
|
|
14228
14243
|
/**
|
|
@@ -16210,7 +16225,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16210
16225
|
const {
|
|
16211
16226
|
rowExpandedMaps,
|
|
16212
16227
|
rowExpandLazyLoadedMaps,
|
|
16213
|
-
expandColumn
|
|
16228
|
+
expandColumn
|
|
16214
16229
|
} = reactData;
|
|
16215
16230
|
const {
|
|
16216
16231
|
fullAllDataRowIdData
|
|
@@ -16226,8 +16241,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16226
16241
|
toggleMethod
|
|
16227
16242
|
} = expandOpts;
|
|
16228
16243
|
const lazyRests = [];
|
|
16229
|
-
const columnIndex =
|
|
16230
|
-
const $columnIndex =
|
|
16244
|
+
const columnIndex = $xeTable.getColumnIndex(expandColumn);
|
|
16245
|
+
const $columnIndex = $xeTable.getVMColumnIndex(expandColumn);
|
|
16231
16246
|
if (rows) {
|
|
16232
16247
|
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)) {
|
|
16233
16248
|
rows = [rows];
|
|
@@ -16240,7 +16255,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16240
16255
|
const validRows = toggleMethod ? rows.filter(row => toggleMethod({
|
|
16241
16256
|
$table: $xeTable,
|
|
16242
16257
|
expanded,
|
|
16243
|
-
column,
|
|
16258
|
+
column: expandColumn,
|
|
16244
16259
|
columnIndex,
|
|
16245
16260
|
$columnIndex,
|
|
16246
16261
|
row,
|
|
@@ -16273,7 +16288,13 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16273
16288
|
}
|
|
16274
16289
|
}
|
|
16275
16290
|
reactData.rowExpandedMaps = rExpandedMaps;
|
|
16276
|
-
return Promise.all(lazyRests).then(() => $xeTable.recalculate()).then(() =>
|
|
16291
|
+
return Promise.all(lazyRests).then(() => $xeTable.recalculate()).then(() => {
|
|
16292
|
+
if (expandColumn) {
|
|
16293
|
+
updateRowExpandStyle();
|
|
16294
|
+
handleRowExpandScroll();
|
|
16295
|
+
}
|
|
16296
|
+
return $xeTable.updateCellAreas();
|
|
16297
|
+
});
|
|
16277
16298
|
},
|
|
16278
16299
|
/**
|
|
16279
16300
|
* 判断行是否为展开状态
|
|
@@ -18623,7 +18644,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
18623
18644
|
const isSelected = sLen >= vLen;
|
|
18624
18645
|
const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
|
|
18625
18646
|
if (checkField) {
|
|
18626
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().
|
|
18647
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, checkField, isSelected);
|
|
18627
18648
|
}
|
|
18628
18649
|
if (isSelected) {
|
|
18629
18650
|
if (!checkField) {
|
|
@@ -28294,6 +28315,11 @@ render_renderer.mixin({
|
|
|
28294
28315
|
tableFilterDefaultMethod: handleFilterMethod,
|
|
28295
28316
|
tableExportMethod: handleExportSelectMethod
|
|
28296
28317
|
},
|
|
28318
|
+
formatOption: {
|
|
28319
|
+
renderTableDefault(renderOpts, params) {
|
|
28320
|
+
return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params));
|
|
28321
|
+
}
|
|
28322
|
+
},
|
|
28297
28323
|
VxeTreeSelect: {
|
|
28298
28324
|
tableAutoFocus: 'input',
|
|
28299
28325
|
renderTableEdit: defaultTableOrTreeSelectEditRender,
|
|
@@ -28302,6 +28328,11 @@ render_renderer.mixin({
|
|
|
28302
28328
|
},
|
|
28303
28329
|
tableExportMethod: handleExportTreeSelectMethod
|
|
28304
28330
|
},
|
|
28331
|
+
formatTree: {
|
|
28332
|
+
renderTableDefault(renderOpts, params) {
|
|
28333
|
+
return getCellLabelVNs(renderOpts, params, getTreeSelectCellValue(renderOpts, params));
|
|
28334
|
+
}
|
|
28335
|
+
},
|
|
28305
28336
|
VxeTableSelect: {
|
|
28306
28337
|
tableAutoFocus: 'input',
|
|
28307
28338
|
renderTableEdit: defaultTableOrTreeSelectEditRender,
|