vxe-table 4.10.3 → 4.10.4
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/src/cell.js +23 -11
- package/es/table/src/table.js +12 -5
- package/es/table/src/util.js +6 -5
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +47 -15
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/cell.js +20 -3
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/table.js +17 -5
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +8 -5
- package/lib/table/src/util.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/src/cell.ts +23 -11
- package/packages/table/src/table.ts +13 -6
- package/packages/table/src/util.ts +6 -5
- /package/es/{iconfont.1736327177051.ttf → iconfont.1736406719113.ttf} +0 -0
- /package/es/{iconfont.1736327177051.woff → iconfont.1736406719113.woff} +0 -0
- /package/es/{iconfont.1736327177051.woff2 → iconfont.1736406719113.woff2} +0 -0
- /package/lib/{iconfont.1736327177051.ttf → iconfont.1736406719113.ttf} +0 -0
- /package/lib/{iconfont.1736327177051.woff → iconfont.1736406719113.woff} +0 -0
- /package/lib/{iconfont.1736327177051.woff2 → iconfont.1736406719113.woff2} +0 -0
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.10.
|
|
3141
|
+
const version = "4.10.4";
|
|
3142
3142
|
core_.VxeUI.version = version;
|
|
3143
3143
|
core_.VxeUI.tableVersion = version;
|
|
3144
3144
|
core_.VxeUI.setConfig({
|
|
@@ -3558,7 +3558,7 @@ var esnext_iterator_some = __webpack_require__(7550);
|
|
|
3558
3558
|
const {
|
|
3559
3559
|
log: log_log
|
|
3560
3560
|
} = core_.VxeUI;
|
|
3561
|
-
const log_version = `table v${"4.10.
|
|
3561
|
+
const log_version = `table v${"4.10.4"}`;
|
|
3562
3562
|
const warnLog = log_log.create('warn', log_version);
|
|
3563
3563
|
const errLog = log_log.create('error', log_version);
|
|
3564
3564
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -4347,6 +4347,9 @@ function rowToVisible($xeTable, row) {
|
|
|
4347
4347
|
scrollYStore,
|
|
4348
4348
|
fullAllDataRowIdData
|
|
4349
4349
|
} = internalData;
|
|
4350
|
+
const {
|
|
4351
|
+
rowHeight
|
|
4352
|
+
} = scrollYStore;
|
|
4350
4353
|
const tableBody = refTableBody.value;
|
|
4351
4354
|
const {
|
|
4352
4355
|
leftList,
|
|
@@ -4380,19 +4383,19 @@ function rowToVisible($xeTable, row) {
|
|
|
4380
4383
|
// 如果是虚拟渲染滚动
|
|
4381
4384
|
if (scrollYLoad) {
|
|
4382
4385
|
if (showOverflow) {
|
|
4383
|
-
return $xeTable.scrollTo(null, ($xeTable.findRowIndexOf(afterFullData, row) - 1) *
|
|
4386
|
+
return $xeTable.scrollTo(null, ($xeTable.findRowIndexOf(afterFullData, row) - 1) * rowHeight);
|
|
4384
4387
|
}
|
|
4385
4388
|
let scrollTop = 0;
|
|
4386
|
-
const
|
|
4387
|
-
const rHeight =
|
|
4389
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
4390
|
+
const rHeight = rowRest ? rowRest.height || rowHeight : rowHeight;
|
|
4388
4391
|
for (let i = 0; i < afterFullData.length; i++) {
|
|
4389
4392
|
const currRow = afterFullData[i];
|
|
4390
4393
|
const currRowid = getRowid($xeTable, currRow);
|
|
4391
4394
|
if (currRow === row || currRowid === rowid) {
|
|
4392
4395
|
break;
|
|
4393
4396
|
}
|
|
4394
|
-
const
|
|
4395
|
-
scrollTop +=
|
|
4397
|
+
const rowRest = fullAllDataRowIdData[currRowid];
|
|
4398
|
+
scrollTop += rowRest ? rowRest.height || rowHeight : rowHeight;
|
|
4396
4399
|
}
|
|
4397
4400
|
if (scrollTop < bodyScrollTop) {
|
|
4398
4401
|
return $xeTable.scrollTo(null, scrollTop - offsetFixedLeft - 1);
|
|
@@ -4572,9 +4575,17 @@ function renderTitleSuffixIcon(params) {
|
|
|
4572
4575
|
}
|
|
4573
4576
|
function renderCellDragIcon(params) {
|
|
4574
4577
|
const {
|
|
4575
|
-
$table
|
|
4578
|
+
$table,
|
|
4579
|
+
column
|
|
4576
4580
|
} = params;
|
|
4581
|
+
const {
|
|
4582
|
+
context
|
|
4583
|
+
} = $table;
|
|
4584
|
+
const tableSlots = context.slots;
|
|
4577
4585
|
const tableProps = $table.props;
|
|
4586
|
+
const {
|
|
4587
|
+
slots
|
|
4588
|
+
} = column;
|
|
4578
4589
|
const {
|
|
4579
4590
|
dragConfig
|
|
4580
4591
|
} = tableProps;
|
|
@@ -4589,6 +4600,7 @@ function renderCellDragIcon(params) {
|
|
|
4589
4600
|
} = rowDragOpts;
|
|
4590
4601
|
const rDisabledMethod = disabledMethod || (dragConfig ? dragConfig.rowDisabledMethod : null);
|
|
4591
4602
|
const isDisabled = rDisabledMethod && rDisabledMethod(params);
|
|
4603
|
+
const rowDragIconSlot = (slots ? slots.rowDragIcon || slots['row-drag-icon'] : null) || tableSlots.rowDragIcon || tableSlots['row-drag-icon'];
|
|
4592
4604
|
const ons = {};
|
|
4593
4605
|
if (trigger !== 'cell') {
|
|
4594
4606
|
ons.onMousedown = evnt => {
|
|
@@ -4604,7 +4616,7 @@ function renderCellDragIcon(params) {
|
|
|
4604
4616
|
'is--disabled': isDisabled
|
|
4605
4617
|
}],
|
|
4606
4618
|
...ons
|
|
4607
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
4619
|
+
}, rowDragIconSlot ? $table.callSlot(rowDragIconSlot, params) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
4608
4620
|
class: icon || (dragConfig ? dragConfig.rowIcon : '') || cell_getIcon().TABLE_DRAG_ROW
|
|
4609
4621
|
})]);
|
|
4610
4622
|
}
|
|
@@ -4652,6 +4664,13 @@ function renderHeaderCellDragIcon(params) {
|
|
|
4652
4664
|
$table,
|
|
4653
4665
|
column
|
|
4654
4666
|
} = params;
|
|
4667
|
+
const {
|
|
4668
|
+
context
|
|
4669
|
+
} = $table;
|
|
4670
|
+
const tableSlots = context.slots;
|
|
4671
|
+
const {
|
|
4672
|
+
slots
|
|
4673
|
+
} = column;
|
|
4655
4674
|
const {
|
|
4656
4675
|
computeColumnOpts,
|
|
4657
4676
|
computeColumnDragOpts
|
|
@@ -4670,6 +4689,7 @@ function renderHeaderCellDragIcon(params) {
|
|
|
4670
4689
|
if (columnOpts.drag && showIcon && (!visibleMethod || visibleMethod(params))) {
|
|
4671
4690
|
if (!column.fixed && (isPeerDrag || isCrossDrag || !column.parentId)) {
|
|
4672
4691
|
const isDisabled = disabledMethod && disabledMethod(params);
|
|
4692
|
+
const columnDragIconSlot = (slots ? slots.columnDragIcon || slots['column-drag-icon'] : null) || tableSlots.columnDragIcon || tableSlots['column-drag-icon'];
|
|
4673
4693
|
const ons = {};
|
|
4674
4694
|
if (trigger !== 'cell') {
|
|
4675
4695
|
ons.onMousedown = evnt => {
|
|
@@ -4685,7 +4705,7 @@ function renderHeaderCellDragIcon(params) {
|
|
|
4685
4705
|
'is--disabled': isDisabled
|
|
4686
4706
|
}],
|
|
4687
4707
|
...ons
|
|
4688
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
4708
|
+
}, columnDragIconSlot ? $table.callSlot(columnDragIconSlot, params) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
4689
4709
|
class: icon || cell_getIcon().TABLE_DRAG_COLUMN
|
|
4690
4710
|
})]);
|
|
4691
4711
|
}
|
|
@@ -11331,10 +11351,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
11331
11351
|
const row = afterFullData[rIndex];
|
|
11332
11352
|
const rowid = getRowid($xeTable, row);
|
|
11333
11353
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
11334
|
-
|
|
11335
|
-
break;
|
|
11336
|
-
}
|
|
11337
|
-
offsetTop += rowRest.height || rowHeight;
|
|
11354
|
+
offsetTop += rowRest ? rowRest.height || rowHeight : rowHeight;
|
|
11338
11355
|
if (toVisibleIndex === -1 && scrollTop < offsetTop) {
|
|
11339
11356
|
toVisibleIndex = rIndex;
|
|
11340
11357
|
}
|
|
@@ -16372,6 +16389,13 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16372
16389
|
* @param {ColumnInfo} fieldOrColumn 列配置
|
|
16373
16390
|
*/
|
|
16374
16391
|
scrollToRow(row, fieldOrColumn) {
|
|
16392
|
+
const {
|
|
16393
|
+
showOverflow
|
|
16394
|
+
} = props;
|
|
16395
|
+
const {
|
|
16396
|
+
scrollYLoad,
|
|
16397
|
+
scrollXLoad
|
|
16398
|
+
} = reactData;
|
|
16375
16399
|
const rest = [];
|
|
16376
16400
|
if (row) {
|
|
16377
16401
|
if (props.treeConfig) {
|
|
@@ -16383,7 +16407,15 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
16383
16407
|
if (fieldOrColumn) {
|
|
16384
16408
|
rest.push(handleScrollToRowColumn(fieldOrColumn, row));
|
|
16385
16409
|
}
|
|
16386
|
-
return Promise.all(rest)
|
|
16410
|
+
return Promise.all(rest).then(() => {
|
|
16411
|
+
if (row) {
|
|
16412
|
+
if (!showOverflow && (scrollYLoad || scrollXLoad)) {
|
|
16413
|
+
calcCellHeight();
|
|
16414
|
+
calcCellWidth();
|
|
16415
|
+
}
|
|
16416
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
16417
|
+
}
|
|
16418
|
+
});
|
|
16387
16419
|
},
|
|
16388
16420
|
/**
|
|
16389
16421
|
* 如果有滚动条,则滚动到对应的列
|