vxe-table 3.20.13 → 3.21.0-beta.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/module/edit/mixin.js +33 -12
- package/es/table/module/keyboard/mixin.js +2 -2
- package/es/table/src/cell.js +3 -3
- package/es/table/src/column.js +6 -3
- package/es/table/src/group.js +6 -3
- package/es/table/src/methods.js +365 -165
- package/es/table/src/props.js +2 -2
- package/es/table/src/table.js +13 -6
- package/es/table/src/util.js +12 -3
- package/es/ui/index.js +3 -3
- package/es/ui/src/dom.js +4 -0
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +364 -302
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/edit/mixin.js +39 -12
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +2 -2
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/src/cell.js +3 -3
- package/lib/table/src/column.js +6 -3
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/group.js +6 -3
- package/lib/table/src/group.min.js +1 -1
- package/lib/table/src/methods.js +35 -29
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +2 -2
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +15 -6
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +12 -3
- package/lib/table/src/util.min.js +1 -1
- package/lib/ui/index.js +3 -3
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +5 -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/package.json +3 -3
- package/packages/table/module/edit/mixin.ts +47 -12
- package/packages/table/module/keyboard/mixin.ts +2 -2
- package/packages/table/src/cell.ts +5 -5
- package/packages/table/src/column.ts +10 -7
- package/packages/table/src/group.ts +10 -6
- package/packages/table/src/methods.ts +376 -161
- package/packages/table/src/props.ts +3 -3
- package/packages/table/src/table.ts +13 -6
- package/packages/table/src/util.ts +16 -6
- package/packages/ui/index.ts +2 -2
- package/packages/ui/src/dom.ts +5 -0
- /package/es/{iconfont.1776926445391.ttf → iconfont.1777796331871.ttf} +0 -0
- /package/es/{iconfont.1776926445391.woff → iconfont.1777796331871.woff} +0 -0
- /package/es/{iconfont.1776926445391.woff2 → iconfont.1777796331871.woff2} +0 -0
- /package/lib/{iconfont.1776926445391.ttf → iconfont.1777796331871.ttf} +0 -0
- /package/lib/{iconfont.1776926445391.woff → iconfont.1777796331871.woff} +0 -0
- /package/lib/{iconfont.1776926445391.woff2 → iconfont.1777796331871.woff2} +0 -0
package/es/table/src/props.js
CHANGED
|
@@ -294,8 +294,8 @@ export const tableProps = {
|
|
|
294
294
|
virtualYConfig: Object,
|
|
295
295
|
// 滚动条配置项
|
|
296
296
|
scrollbarConfig: Object,
|
|
297
|
-
//
|
|
298
|
-
|
|
297
|
+
// 撤销/恢复历史配置项
|
|
298
|
+
undoRedoHistoryConfig: Object,
|
|
299
299
|
// (即将废弃)优化相关
|
|
300
300
|
animat: { type: Boolean, default: () => getConfig().table.animat },
|
|
301
301
|
// (可能会被废弃的参数,不要使用)
|
package/es/table/src/table.js
CHANGED
|
@@ -1343,10 +1343,10 @@ export default {
|
|
|
1343
1343
|
}
|
|
1344
1344
|
return [];
|
|
1345
1345
|
},
|
|
1346
|
-
|
|
1346
|
+
computeUndoRedoHistoryOpts() {
|
|
1347
1347
|
const $xeTable = this;
|
|
1348
1348
|
const props = $xeTable;
|
|
1349
|
-
return Object.assign({}, getConfig().table.
|
|
1349
|
+
return Object.assign({}, getConfig().table.undoRedoHistoryConfig, props.undoRedoHistoryConfig);
|
|
1350
1350
|
},
|
|
1351
1351
|
tabsResizeFlag() {
|
|
1352
1352
|
const $xeTable = this;
|
|
@@ -1531,7 +1531,7 @@ export default {
|
|
|
1531
1531
|
const internalData = $xeTable;
|
|
1532
1532
|
XEUtils.assign(internalData, createInternalData());
|
|
1533
1533
|
handleKeyField($xeTable);
|
|
1534
|
-
const { exportConfig, importConfig, treeConfig, minHeight } = props;
|
|
1534
|
+
const { editConfig, exportConfig, importConfig, treeConfig, minHeight, keepSource } = props;
|
|
1535
1535
|
const { scrollXStore, scrollYStore } = internalData;
|
|
1536
1536
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
1537
1537
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
@@ -1566,8 +1566,15 @@ export default {
|
|
|
1566
1566
|
if (!(props.rowId || rowOpts.keyField) && (checkboxOpts.reserve || checkboxOpts.checkRowKeys || radioOpts.reserve || radioOpts.checkRowKey || expandOpts.expandRowKeys || treeOpts.expandRowKeys)) {
|
|
1567
1567
|
warnLog('vxe.error.reqProp', ['row-config.keyField']);
|
|
1568
1568
|
}
|
|
1569
|
-
if (
|
|
1570
|
-
|
|
1569
|
+
if (editConfig) {
|
|
1570
|
+
if (!keepSource) {
|
|
1571
|
+
if (editOpts.showStatus || editOpts.showUpdateStatus || editOpts.showInsertStatus) {
|
|
1572
|
+
warnLog('vxe.error.reqSupportProp', ['edit-config.showStatus | showUpdateStatus | showInsertStatus', 'keep-source']);
|
|
1573
|
+
}
|
|
1574
|
+
// if (keyboardOpts.isUndoRedo) {
|
|
1575
|
+
// warnLog('vxe.error.reqSupportProp', ['keyboard-config.isUndoRedo', 'keep-source'])
|
|
1576
|
+
// }
|
|
1577
|
+
}
|
|
1571
1578
|
}
|
|
1572
1579
|
// if (treeConfig && (treeOpts.showLine || treeOpts.line) && !showOverflow) {
|
|
1573
1580
|
// warnLog('vxe.error.reqProp', ['show-overflow'])
|
|
@@ -1640,7 +1647,7 @@ export default {
|
|
|
1640
1647
|
if (rowOpts.height && !this.showOverflow) {
|
|
1641
1648
|
warnLog('vxe.error.notProp', ['table.show-overflow']);
|
|
1642
1649
|
}
|
|
1643
|
-
if (!$xeTable.
|
|
1650
|
+
if (!$xeTable.triggerCelllAreaMnEvent) {
|
|
1644
1651
|
if (props.areaConfig) {
|
|
1645
1652
|
warnLog('vxe.error.notProp', ['area-config']);
|
|
1646
1653
|
}
|
package/es/table/src/util.js
CHANGED
|
@@ -130,6 +130,10 @@ export function createInternalData() {
|
|
|
130
130
|
tBodyHeight: 0,
|
|
131
131
|
// 表尾高度
|
|
132
132
|
tFooterHeight: 0,
|
|
133
|
+
stackHistoryStore: {
|
|
134
|
+
undoStacks: [],
|
|
135
|
+
redoStacks: []
|
|
136
|
+
},
|
|
133
137
|
teleportToWrapperElem: null,
|
|
134
138
|
popupToWrapperElem: null,
|
|
135
139
|
customPopupToElem: null,
|
|
@@ -282,7 +286,7 @@ export function createReactData() {
|
|
|
282
286
|
tooltipStore: {
|
|
283
287
|
row: null,
|
|
284
288
|
column: null,
|
|
285
|
-
content:
|
|
289
|
+
content: '',
|
|
286
290
|
visible: false,
|
|
287
291
|
type: null,
|
|
288
292
|
currOpts: {}
|
|
@@ -769,10 +773,15 @@ export function getLastChildColumn(column) {
|
|
|
769
773
|
return column;
|
|
770
774
|
}
|
|
771
775
|
export function getCellValue(row, column) {
|
|
772
|
-
|
|
776
|
+
if (column) {
|
|
777
|
+
return XEUtils.get(row, column.field);
|
|
778
|
+
}
|
|
779
|
+
return null;
|
|
773
780
|
}
|
|
774
781
|
export function setCellValue(row, column, value) {
|
|
775
|
-
|
|
782
|
+
if (column) {
|
|
783
|
+
XEUtils.set(row, column.field, value);
|
|
784
|
+
}
|
|
776
785
|
}
|
|
777
786
|
export function getRefElem(refEl) {
|
|
778
787
|
if (refEl) {
|
package/es/ui/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VxeUI } from '@vxe-ui/core';
|
|
2
2
|
import { getFuncText } from './src/utils';
|
|
3
|
-
export const version = "3.
|
|
3
|
+
export const version = "3.21.0-beta.0";
|
|
4
4
|
VxeUI.version = version;
|
|
5
5
|
VxeUI.tableVersion = version;
|
|
6
6
|
VxeUI.setConfig({
|
|
@@ -264,8 +264,8 @@ VxeUI.setConfig({
|
|
|
264
264
|
visible: true
|
|
265
265
|
}
|
|
266
266
|
},
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
undoRedoHistoryConfig: {
|
|
268
|
+
stackSize: 20
|
|
269
269
|
}
|
|
270
270
|
},
|
|
271
271
|
grid: {
|
package/es/ui/src/dom.js
CHANGED
|
@@ -164,6 +164,10 @@ export function getAbsolutePos(elem) {
|
|
|
164
164
|
const { scrollTop, scrollLeft, visibleHeight, visibleWidth } = getDomNode();
|
|
165
165
|
return { boundingTop, top: scrollTop + boundingTop, boundingLeft, left: scrollLeft + boundingLeft, visibleHeight, visibleWidth };
|
|
166
166
|
}
|
|
167
|
+
export function hasEventInputTarget(target) {
|
|
168
|
+
const tagName = target ? target.tagName : '';
|
|
169
|
+
return tagName && ['input', 'textarea'].includes((tagName.toLowerCase()));
|
|
170
|
+
}
|
|
167
171
|
const scrollIntoViewIfNeeded = 'scrollIntoViewIfNeeded';
|
|
168
172
|
const scrollIntoView = 'scrollIntoView';
|
|
169
173
|
export function scrollToView(elem) {
|
package/es/ui/src/log.js
CHANGED