vxe-table 3.19.4 → 3.19.6
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 +13 -11
- package/es/table/module/export/mixin.js +5 -3
- package/es/table/src/cell.js +2 -2
- package/es/table/src/methods.js +17 -1
- package/es/table/src/table.js +5 -1
- package/es/table/style.css +4 -3
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +3 -3
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +17 -0
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +4 -3
- 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 +63 -22
- 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 +13 -11
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/mixin.js +5 -3
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/src/cell.js +2 -2
- package/lib/table/src/methods.js +16 -0
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +5 -1
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +4 -3
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +3 -3
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +18 -0
- package/lib/ui/src/dom.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 +4 -3
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/table/module/edit/mixin.ts +13 -11
- package/packages/table/module/export/mixin.ts +5 -3
- package/packages/table/src/cell.ts +2 -2
- package/packages/table/src/methods.ts +18 -1
- package/packages/table/src/table.ts +5 -1
- package/packages/toolbar/src/toolbar.ts +3 -3
- package/packages/ui/src/dom.ts +18 -0
- package/styles/components/table.scss +34 -3
- /package/es/{iconfont.1761699967297.ttf → iconfont.1761877353318.ttf} +0 -0
- /package/es/{iconfont.1761699967297.woff → iconfont.1761877353318.woff} +0 -0
- /package/es/{iconfont.1761699967297.woff2 → iconfont.1761877353318.woff2} +0 -0
- /package/lib/{iconfont.1761699967297.ttf → iconfont.1761877353318.ttf} +0 -0
- /package/lib/{iconfont.1761699967297.woff → iconfont.1761877353318.woff} +0 -0
- /package/lib/{iconfont.1761699967297.woff2 → iconfont.1761877353318.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -2005,7 +2005,7 @@ function getClass(property, params) {
|
|
|
2005
2005
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2006
2006
|
|
|
2007
2007
|
|
|
2008
|
-
const version = "3.19.
|
|
2008
|
+
const version = "3.19.6";
|
|
2009
2009
|
core_.VxeUI.version = version;
|
|
2010
2010
|
core_.VxeUI.tableVersion = version;
|
|
2011
2011
|
core_.VxeUI.setConfig({
|
|
@@ -2622,6 +2622,23 @@ function updateCellTitle(overflowElem, column) {
|
|
|
2622
2622
|
overflowElem.setAttribute('title', content);
|
|
2623
2623
|
}
|
|
2624
2624
|
}
|
|
2625
|
+
function checkTargetElement(target, exEls, endEl) {
|
|
2626
|
+
let targetEl = target;
|
|
2627
|
+
if (!exEls || !exEls.length) {
|
|
2628
|
+
return false;
|
|
2629
|
+
}
|
|
2630
|
+
const [exEl1, exEl2, exEl3] = exEls;
|
|
2631
|
+
while (targetEl) {
|
|
2632
|
+
if (exEl1 === targetEl || exEl2 && targetEl === exEl2 || exEl3 && targetEl === exEl3) {
|
|
2633
|
+
return true;
|
|
2634
|
+
}
|
|
2635
|
+
if (endEl && targetEl === endEl) {
|
|
2636
|
+
return false;
|
|
2637
|
+
}
|
|
2638
|
+
targetEl = targetEl.parentElement;
|
|
2639
|
+
}
|
|
2640
|
+
return false;
|
|
2641
|
+
}
|
|
2625
2642
|
/**
|
|
2626
2643
|
* 检查触发源是否属于目标节点
|
|
2627
2644
|
*/
|
|
@@ -2696,7 +2713,7 @@ function isNodeElement(elem) {
|
|
|
2696
2713
|
const {
|
|
2697
2714
|
log: log_log
|
|
2698
2715
|
} = core_.VxeUI;
|
|
2699
|
-
const log_version = `table v${"3.19.
|
|
2716
|
+
const log_version = `table v${"3.19.6"}`;
|
|
2700
2717
|
const warnLog = log_log.create('warn', log_version);
|
|
2701
2718
|
const errLog = log_log.create('error', log_version);
|
|
2702
2719
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -4462,8 +4479,8 @@ const Cell = {
|
|
|
4462
4479
|
const {
|
|
4463
4480
|
seq
|
|
4464
4481
|
} = params;
|
|
4465
|
-
const
|
|
4466
|
-
return renderCellBaseVNs(h, params, [h('span', `${formatText(
|
|
4482
|
+
const seqMd = seqOpts.seqMethod;
|
|
4483
|
+
return renderCellBaseVNs(h, params, [h('span', `${formatText(seqMd ? seqMd(params) : treeConfig ? seq : (seqOpts.startIndex || 0) + seq, 1)}`)]);
|
|
4467
4484
|
},
|
|
4468
4485
|
renderDeepIndexCell(h, params) {
|
|
4469
4486
|
return Cell.renderDeepNodeBtn(h, params, Cell.renderSeqCell(h, params));
|
|
@@ -18635,6 +18652,7 @@ const Methods = {
|
|
|
18635
18652
|
},
|
|
18636
18653
|
triggerBodyWheelEvent(evnt) {
|
|
18637
18654
|
const $xeTable = this;
|
|
18655
|
+
const $xeParentTable = $xeTable.$xeParentTable;
|
|
18638
18656
|
const tableProps = $xeTable;
|
|
18639
18657
|
const reactData = $xeTable;
|
|
18640
18658
|
const internalData = $xeTable;
|
|
@@ -18708,6 +18726,21 @@ const Methods = {
|
|
|
18708
18726
|
return;
|
|
18709
18727
|
}
|
|
18710
18728
|
}
|
|
18729
|
+
// 展开行处理,如果展开行嵌入表格中
|
|
18730
|
+
if ($xeParentTable) {
|
|
18731
|
+
if (isRollY) {
|
|
18732
|
+
if (checkTargetElement(evnt.target, [leftScrollElem, bodyScrollElem, rightScrollElem], evnt.currentTarget)) {
|
|
18733
|
+
evnt.stopPropagation();
|
|
18734
|
+
return;
|
|
18735
|
+
}
|
|
18736
|
+
}
|
|
18737
|
+
if (isRollX) {
|
|
18738
|
+
if (checkTargetElement(evnt.target, [headerScrollElem, bodyScrollElem, footerScrollElem], evnt.currentTarget)) {
|
|
18739
|
+
evnt.stopPropagation();
|
|
18740
|
+
return;
|
|
18741
|
+
}
|
|
18742
|
+
}
|
|
18743
|
+
}
|
|
18711
18744
|
if (!(leftFixedWidth || rightFixedWidth || expandColumn)) {
|
|
18712
18745
|
return;
|
|
18713
18746
|
}
|
|
@@ -25358,16 +25391,16 @@ function insertTreeRow($xeTable, newRecords, isAppend) {
|
|
|
25358
25391
|
} = matchObj;
|
|
25359
25392
|
const parentRest = fullAllDataRowIdData[getRowid($xeTable, parentRow)];
|
|
25360
25393
|
const parentLevel = parentRest ? parentRest.level : 0;
|
|
25361
|
-
let
|
|
25362
|
-
let
|
|
25363
|
-
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(
|
|
25364
|
-
|
|
25394
|
+
let pChilds = parentRow[childrenField];
|
|
25395
|
+
let pMapChilds = parentRow[mapChildrenField];
|
|
25396
|
+
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(pChilds)) {
|
|
25397
|
+
pChilds = parentRow[childrenField] = [];
|
|
25365
25398
|
}
|
|
25366
|
-
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(
|
|
25367
|
-
|
|
25399
|
+
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(pMapChilds)) {
|
|
25400
|
+
pMapChilds = parentRow[mapChildrenField] = [];
|
|
25368
25401
|
}
|
|
25369
|
-
|
|
25370
|
-
|
|
25402
|
+
pChilds[funcName](item);
|
|
25403
|
+
pMapChilds[funcName](item);
|
|
25371
25404
|
const rest = {
|
|
25372
25405
|
row: item,
|
|
25373
25406
|
rowid,
|
|
@@ -25377,7 +25410,7 @@ function insertTreeRow($xeTable, newRecords, isAppend) {
|
|
|
25377
25410
|
$index: -1,
|
|
25378
25411
|
treeIndex: -1,
|
|
25379
25412
|
_tIndex: -1,
|
|
25380
|
-
items:
|
|
25413
|
+
items: pChilds,
|
|
25381
25414
|
parent: parentRow,
|
|
25382
25415
|
level: parentLevel + 1,
|
|
25383
25416
|
height: 0,
|
|
@@ -25560,13 +25593,15 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
25560
25593
|
treeRecords.forEach((row, i) => {
|
|
25561
25594
|
if (parentRow) {
|
|
25562
25595
|
if (row[parentField] !== parentRow[rowField]) {
|
|
25563
|
-
row[parentField] = parentRow[rowField];
|
|
25564
25596
|
errLog('vxe.error.errProp', [`${parentField}=${row[parentField]}`, `${parentField}=${parentRow[rowField]}`]);
|
|
25597
|
+
row[parentField] = parentRow[rowField];
|
|
25565
25598
|
}
|
|
25566
25599
|
} else {
|
|
25567
25600
|
if (row[parentField] !== null) {
|
|
25601
|
+
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(row[parentField])) {
|
|
25602
|
+
errLog('vxe.error.errProp', [`${parentField}=${row[parentField]}`, 'null']);
|
|
25603
|
+
}
|
|
25568
25604
|
row[parentField] = null;
|
|
25569
|
-
errLog('vxe.error.errProp', [`${parentField}=${row[parentField]}`, 'null']);
|
|
25570
25605
|
}
|
|
25571
25606
|
}
|
|
25572
25607
|
let targetIndex = matchMapObj.index + i;
|
|
@@ -26641,15 +26676,17 @@ function hasTreeChildren($xeTable, row) {
|
|
|
26641
26676
|
}
|
|
26642
26677
|
function getSeq($xeTable, cellValue, row, $rowIndex, column, $columnIndex) {
|
|
26643
26678
|
const seqOpts = $xeTable.computeSeqOpts;
|
|
26644
|
-
const
|
|
26645
|
-
if (
|
|
26646
|
-
return
|
|
26679
|
+
const seqMd = seqOpts.seqMethod || column.seqMethod;
|
|
26680
|
+
if (seqMd) {
|
|
26681
|
+
return seqMd({
|
|
26647
26682
|
$table: $xeTable,
|
|
26648
26683
|
row,
|
|
26649
26684
|
rowIndex: $xeTable.getRowIndex(row),
|
|
26685
|
+
_rowIndex: $xeTable.getVTRowIndex(row),
|
|
26650
26686
|
$rowIndex,
|
|
26651
26687
|
column,
|
|
26652
26688
|
columnIndex: $xeTable.getColumnIndex(column),
|
|
26689
|
+
_columnIndex: $xeTable.getVTColumnIndex(column),
|
|
26653
26690
|
$columnIndex
|
|
26654
26691
|
});
|
|
26655
26692
|
}
|
|
@@ -30681,6 +30718,10 @@ function renderBody(h, $xeTable) {
|
|
|
30681
30718
|
$xeTabs: {
|
|
30682
30719
|
default: null
|
|
30683
30720
|
},
|
|
30721
|
+
$xeParentTable: {
|
|
30722
|
+
from: '$xeTable',
|
|
30723
|
+
default: null
|
|
30724
|
+
},
|
|
30684
30725
|
$xeGrid: {
|
|
30685
30726
|
default: null
|
|
30686
30727
|
},
|
|
@@ -31645,7 +31686,7 @@ function renderBody(h, $xeTable) {
|
|
|
31645
31686
|
const {
|
|
31646
31687
|
initStatus
|
|
31647
31688
|
} = this;
|
|
31648
|
-
if (value && value.length >=
|
|
31689
|
+
if (value && value.length >= 20000) {
|
|
31649
31690
|
warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)']);
|
|
31650
31691
|
}
|
|
31651
31692
|
this.loadTableData(value || [], true).then(() => {
|
|
@@ -33078,7 +33119,7 @@ function toolbar_createInternalData() {
|
|
|
33078
33119
|
return VxeUIButtonComponent ? h(VxeUIButtonComponent, {
|
|
33079
33120
|
key: index,
|
|
33080
33121
|
props: Object.assign({}, child, {
|
|
33081
|
-
content: child.name,
|
|
33122
|
+
content: child.content || child.name,
|
|
33082
33123
|
options: undefined
|
|
33083
33124
|
}),
|
|
33084
33125
|
on: {
|
|
@@ -33142,7 +33183,7 @@ function toolbar_createInternalData() {
|
|
|
33142
33183
|
if (VxeUIButtonComponent) {
|
|
33143
33184
|
btnVNs.push(h(VxeUIButtonComponent, {
|
|
33144
33185
|
props: Object.assign({}, item, {
|
|
33145
|
-
content: item.name,
|
|
33186
|
+
content: item.content || item.name,
|
|
33146
33187
|
options: undefined
|
|
33147
33188
|
}),
|
|
33148
33189
|
on: {
|
|
@@ -33223,7 +33264,7 @@ function toolbar_createInternalData() {
|
|
|
33223
33264
|
btnVNs.push(h(VxeUIButtonComponent, {
|
|
33224
33265
|
key: tIndex,
|
|
33225
33266
|
props: Object.assign({}, item, {
|
|
33226
|
-
content: item.name,
|
|
33267
|
+
content: item.content || item.name,
|
|
33227
33268
|
options: undefined
|
|
33228
33269
|
}),
|
|
33229
33270
|
on: {
|