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
|
@@ -60,17 +60,17 @@ function insertTreeRow($xeTable, newRecords, isAppend) {
|
|
|
60
60
|
const { item: parentRow } = matchObj;
|
|
61
61
|
const parentRest = fullAllDataRowIdData[getRowid($xeTable, parentRow)];
|
|
62
62
|
const parentLevel = parentRest ? parentRest.level : 0;
|
|
63
|
-
let
|
|
64
|
-
let
|
|
65
|
-
if (!XEUtils.isArray(
|
|
66
|
-
|
|
63
|
+
let pChilds = parentRow[childrenField];
|
|
64
|
+
let pMapChilds = parentRow[mapChildrenField];
|
|
65
|
+
if (!XEUtils.isArray(pChilds)) {
|
|
66
|
+
pChilds = parentRow[childrenField] = [];
|
|
67
67
|
}
|
|
68
|
-
if (!XEUtils.isArray(
|
|
69
|
-
|
|
68
|
+
if (!XEUtils.isArray(pMapChilds)) {
|
|
69
|
+
pMapChilds = parentRow[mapChildrenField] = [];
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const rest = { row: item, rowid, seq: -1, index: -1, _index: -1, $index: -1, treeIndex: -1, _tIndex: -1, items:
|
|
71
|
+
pChilds[funcName](item);
|
|
72
|
+
pMapChilds[funcName](item);
|
|
73
|
+
const rest = { row: item, rowid, seq: -1, index: -1, _index: -1, $index: -1, treeIndex: -1, _tIndex: -1, items: pChilds, parent: parentRow, level: parentLevel + 1, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 };
|
|
74
74
|
fullDataRowIdData[rowid] = rest;
|
|
75
75
|
fullAllDataRowIdData[rowid] = rest;
|
|
76
76
|
}
|
|
@@ -174,14 +174,16 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
174
174
|
treeRecords.forEach((row, i) => {
|
|
175
175
|
if (parentRow) {
|
|
176
176
|
if (row[parentField] !== parentRow[rowField]) {
|
|
177
|
-
row[parentField] = parentRow[rowField];
|
|
178
177
|
errLog('vxe.error.errProp', [`${parentField}=${row[parentField]}`, `${parentField}=${parentRow[rowField]}`]);
|
|
178
|
+
row[parentField] = parentRow[rowField];
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
else {
|
|
182
182
|
if (row[parentField] !== null) {
|
|
183
|
+
if (!XEUtils.eqNull(row[parentField])) {
|
|
184
|
+
errLog('vxe.error.errProp', [`${parentField}=${row[parentField]}`, 'null']);
|
|
185
|
+
}
|
|
183
186
|
row[parentField] = null;
|
|
184
|
-
errLog('vxe.error.errProp', [`${parentField}=${row[parentField]}`, 'null']);
|
|
185
187
|
}
|
|
186
188
|
}
|
|
187
189
|
let targetIndex = matchMapObj.index + i;
|
|
@@ -16,15 +16,17 @@ function hasTreeChildren($xeTable, row) {
|
|
|
16
16
|
}
|
|
17
17
|
function getSeq($xeTable, cellValue, row, $rowIndex, column, $columnIndex) {
|
|
18
18
|
const seqOpts = $xeTable.computeSeqOpts;
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
21
|
-
return
|
|
19
|
+
const seqMd = seqOpts.seqMethod || column.seqMethod;
|
|
20
|
+
if (seqMd) {
|
|
21
|
+
return seqMd({
|
|
22
22
|
$table: $xeTable,
|
|
23
23
|
row,
|
|
24
24
|
rowIndex: $xeTable.getRowIndex(row),
|
|
25
|
+
_rowIndex: $xeTable.getVTRowIndex(row),
|
|
25
26
|
$rowIndex,
|
|
26
27
|
column,
|
|
27
28
|
columnIndex: $xeTable.getColumnIndex(column),
|
|
29
|
+
_columnIndex: $xeTable.getVTColumnIndex(column),
|
|
28
30
|
$columnIndex
|
|
29
31
|
});
|
|
30
32
|
}
|
package/es/table/src/cell.js
CHANGED
|
@@ -613,9 +613,9 @@ export const Cell = {
|
|
|
613
613
|
return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h));
|
|
614
614
|
}
|
|
615
615
|
const { seq } = params;
|
|
616
|
-
const
|
|
616
|
+
const seqMd = seqOpts.seqMethod;
|
|
617
617
|
return renderCellBaseVNs(h, params, [
|
|
618
|
-
h('span', `${formatText(
|
|
618
|
+
h('span', `${formatText(seqMd ? seqMd(params) : treeConfig ? seq : (seqOpts.startIndex || 0) + seq, 1)}`)
|
|
619
619
|
]);
|
|
620
620
|
},
|
|
621
621
|
renderDeepIndexCell(h, params) {
|
package/es/table/src/methods.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
|
-
import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey } from '../../ui/src/dom';
|
|
2
|
+
import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey, checkTargetElement } from '../../ui/src/dom';
|
|
3
3
|
import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils';
|
|
4
4
|
import { VxeUI } from '../../ui';
|
|
5
5
|
import Cell from './cell';
|
|
@@ -10933,6 +10933,7 @@ const Methods = {
|
|
|
10933
10933
|
},
|
|
10934
10934
|
triggerBodyWheelEvent(evnt) {
|
|
10935
10935
|
const $xeTable = this;
|
|
10936
|
+
const $xeParentTable = $xeTable.$xeParentTable;
|
|
10936
10937
|
const tableProps = $xeTable;
|
|
10937
10938
|
const reactData = $xeTable;
|
|
10938
10939
|
const internalData = $xeTable;
|
|
@@ -10991,6 +10992,21 @@ const Methods = {
|
|
|
10991
10992
|
return;
|
|
10992
10993
|
}
|
|
10993
10994
|
}
|
|
10995
|
+
// 展开行处理,如果展开行嵌入表格中
|
|
10996
|
+
if ($xeParentTable) {
|
|
10997
|
+
if (isRollY) {
|
|
10998
|
+
if (checkTargetElement(evnt.target, [leftScrollElem, bodyScrollElem, rightScrollElem], evnt.currentTarget)) {
|
|
10999
|
+
evnt.stopPropagation();
|
|
11000
|
+
return;
|
|
11001
|
+
}
|
|
11002
|
+
}
|
|
11003
|
+
if (isRollX) {
|
|
11004
|
+
if (checkTargetElement(evnt.target, [headerScrollElem, bodyScrollElem, footerScrollElem], evnt.currentTarget)) {
|
|
11005
|
+
evnt.stopPropagation();
|
|
11006
|
+
return;
|
|
11007
|
+
}
|
|
11008
|
+
}
|
|
11009
|
+
}
|
|
10994
11010
|
if (!(leftFixedWidth || rightFixedWidth || expandColumn)) {
|
|
10995
11011
|
return;
|
|
10996
11012
|
}
|
package/es/table/src/table.js
CHANGED
|
@@ -497,6 +497,10 @@ export default {
|
|
|
497
497
|
$xeTabs: {
|
|
498
498
|
default: null
|
|
499
499
|
},
|
|
500
|
+
$xeParentTable: {
|
|
501
|
+
from: '$xeTable',
|
|
502
|
+
default: null
|
|
503
|
+
},
|
|
500
504
|
$xeGrid: {
|
|
501
505
|
default: null
|
|
502
506
|
},
|
|
@@ -1376,7 +1380,7 @@ export default {
|
|
|
1376
1380
|
const $xeTable = this;
|
|
1377
1381
|
const reactData = $xeTable;
|
|
1378
1382
|
const { initStatus } = this;
|
|
1379
|
-
if (value && value.length >=
|
|
1383
|
+
if (value && value.length >= 20000) {
|
|
1380
1384
|
warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)']);
|
|
1381
1385
|
}
|
|
1382
1386
|
this.loadTableData(value || [], true).then(() => {
|
package/es/table/style.css
CHANGED
|
@@ -3547,13 +3547,14 @@
|
|
|
3547
3547
|
left: 50%;
|
|
3548
3548
|
font-size: 12px;
|
|
3549
3549
|
line-height: 1em;
|
|
3550
|
-
transform: translate(-50%, -
|
|
3550
|
+
transform: translate(-50%, -2px);
|
|
3551
3551
|
text-align: left;
|
|
3552
3552
|
z-index: 4;
|
|
3553
3553
|
padding: 0 var(--vxe-ui-table-cell-padding-default);
|
|
3554
3554
|
pointer-events: none;
|
|
3555
3555
|
}
|
|
3556
3556
|
.vxe-table--render-default .vxe-body--column .vxe-cell--valid-error-wrapper {
|
|
3557
|
+
position: relative;
|
|
3557
3558
|
display: inline-block;
|
|
3558
3559
|
border-radius: var(--vxe-ui-border-radius);
|
|
3559
3560
|
pointer-events: auto;
|
|
@@ -3584,11 +3585,11 @@
|
|
|
3584
3585
|
}
|
|
3585
3586
|
.vxe-table--render-default.valid-msg--single .vxe-body--row:last-child .vxe-cell--valid-error-tip {
|
|
3586
3587
|
bottom: 100%;
|
|
3587
|
-
transform: translate(-50%,
|
|
3588
|
+
transform: translate(-50%, 0);
|
|
3588
3589
|
}
|
|
3589
3590
|
.vxe-table--render-default.valid-msg--single .vxe-body--row:last-child:first-child .vxe-cell--valid-error-tip {
|
|
3590
3591
|
bottom: auto;
|
|
3591
|
-
transform: translate(-50%, -
|
|
3592
|
+
transform: translate(-50%, -2px);
|
|
3592
3593
|
}
|
|
3593
3594
|
.vxe-table--render-default.valid-msg--full .vxe-body--row:last-child .vxe-cell--valid-error-tip {
|
|
3594
3595
|
top: calc(100% - 1.3em);
|