vxe-table 3.11.9 → 3.11.10
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 +57 -30
- package/es/table/src/methods.js +6 -3
- package/es/table/src/table.js +0 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +103 -48
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/edit/mixin.js +93 -42
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/src/methods.js +8 -3
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +0 -1
- 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 +1 -1
- package/packages/table/module/edit/mixin.ts +61 -31
- package/packages/table/src/methods.ts +7 -3
- package/packages/table/src/table.ts +0 -1
- /package/es/{iconfont.1732607941851.ttf → iconfont.1732698735693.ttf} +0 -0
- /package/es/{iconfont.1732607941851.woff → iconfont.1732698735693.woff} +0 -0
- /package/es/{iconfont.1732607941851.woff2 → iconfont.1732698735693.woff2} +0 -0
- /package/lib/{iconfont.1732607941851.ttf → iconfont.1732698735693.ttf} +0 -0
- /package/lib/{iconfont.1732607941851.woff → iconfont.1732698735693.woff} +0 -0
- /package/lib/{iconfont.1732607941851.woff2 → iconfont.1732698735693.woff2} +0 -0
package/es/table/src/methods.js
CHANGED
|
@@ -676,7 +676,6 @@ const Methods = {
|
|
|
676
676
|
scrollYStore.endIndex = 1;
|
|
677
677
|
scrollXStore.startIndex = 0;
|
|
678
678
|
scrollXStore.endIndex = 1;
|
|
679
|
-
editStore.insertList = [];
|
|
680
679
|
editStore.insertMaps = {};
|
|
681
680
|
editStore.removeList = [];
|
|
682
681
|
editStore.removeMaps = {};
|
|
@@ -1532,14 +1531,18 @@ const Methods = {
|
|
|
1532
1531
|
isInsertByRow(row) {
|
|
1533
1532
|
const { editStore } = this;
|
|
1534
1533
|
const rowid = getRowid(this, row);
|
|
1535
|
-
return editStore.
|
|
1534
|
+
return !!editStore.insertMaps[rowid];
|
|
1536
1535
|
},
|
|
1537
1536
|
/**
|
|
1538
1537
|
* 删除所有新增的临时数据
|
|
1539
1538
|
* @returns
|
|
1540
1539
|
*/
|
|
1541
1540
|
removeInsertRow() {
|
|
1542
|
-
|
|
1541
|
+
const $xeTable = this;
|
|
1542
|
+
const reactData = $xeTable;
|
|
1543
|
+
const { editStore } = reactData;
|
|
1544
|
+
editStore.insertMaps = {};
|
|
1545
|
+
return $xeTable.remove($xeTable.getInsertRecords());
|
|
1543
1546
|
},
|
|
1544
1547
|
/**
|
|
1545
1548
|
* 检查行或列数据是否发生改变
|
package/es/table/src/table.js
CHANGED
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
|
|
|
2220
2220
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2221
2221
|
|
|
2222
2222
|
|
|
2223
|
-
const version = "3.11.
|
|
2223
|
+
const version = "3.11.10";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2774,7 +2774,7 @@ function isNodeElement(elem) {
|
|
|
2774
2774
|
const {
|
|
2775
2775
|
log: log_log
|
|
2776
2776
|
} = core_.VxeUI;
|
|
2777
|
-
const log_version = `table v${"3.11.
|
|
2777
|
+
const log_version = `table v${"3.11.10"}`;
|
|
2778
2778
|
const warnLog = log_log.create('warn', log_version);
|
|
2779
2779
|
const errLog = log_log.create('error', log_version);
|
|
2780
2780
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -5631,7 +5631,6 @@ const Methods = {
|
|
|
5631
5631
|
scrollYStore.endIndex = 1;
|
|
5632
5632
|
scrollXStore.startIndex = 0;
|
|
5633
5633
|
scrollXStore.endIndex = 1;
|
|
5634
|
-
editStore.insertList = [];
|
|
5635
5634
|
editStore.insertMaps = {};
|
|
5636
5635
|
editStore.removeList = [];
|
|
5637
5636
|
editStore.removeMaps = {};
|
|
@@ -6609,14 +6608,20 @@ const Methods = {
|
|
|
6609
6608
|
editStore
|
|
6610
6609
|
} = this;
|
|
6611
6610
|
const rowid = getRowid(this, row);
|
|
6612
|
-
return editStore.
|
|
6611
|
+
return !!editStore.insertMaps[rowid];
|
|
6613
6612
|
},
|
|
6614
6613
|
/**
|
|
6615
6614
|
* 删除所有新增的临时数据
|
|
6616
6615
|
* @returns
|
|
6617
6616
|
*/
|
|
6618
6617
|
removeInsertRow() {
|
|
6619
|
-
|
|
6618
|
+
const $xeTable = this;
|
|
6619
|
+
const reactData = $xeTable;
|
|
6620
|
+
const {
|
|
6621
|
+
editStore
|
|
6622
|
+
} = reactData;
|
|
6623
|
+
editStore.insertMaps = {};
|
|
6624
|
+
return $xeTable.remove($xeTable.getInsertRecords());
|
|
6620
6625
|
},
|
|
6621
6626
|
/**
|
|
6622
6627
|
* 检查行或列数据是否发生改变
|
|
@@ -17757,17 +17762,25 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
17757
17762
|
});
|
|
17758
17763
|
}
|
|
17759
17764
|
function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
17765
|
+
const $xeTable = _vm;
|
|
17766
|
+
const props = $xeTable;
|
|
17767
|
+
const reactData = $xeTable;
|
|
17768
|
+
const internalData = $xeTable;
|
|
17769
|
+
const {
|
|
17770
|
+
treeConfig
|
|
17771
|
+
} = props;
|
|
17760
17772
|
const {
|
|
17761
|
-
tableFullTreeData,
|
|
17762
17773
|
mergeList,
|
|
17774
|
+
editStore
|
|
17775
|
+
} = reactData;
|
|
17776
|
+
const {
|
|
17777
|
+
tableFullTreeData,
|
|
17763
17778
|
afterFullData,
|
|
17764
|
-
editStore,
|
|
17765
17779
|
tableFullData,
|
|
17766
|
-
treeConfig,
|
|
17767
17780
|
fullDataRowIdData,
|
|
17768
|
-
fullAllDataRowIdData
|
|
17769
|
-
|
|
17770
|
-
|
|
17781
|
+
fullAllDataRowIdData
|
|
17782
|
+
} = internalData;
|
|
17783
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
17771
17784
|
const {
|
|
17772
17785
|
transform,
|
|
17773
17786
|
rowField,
|
|
@@ -17786,8 +17799,25 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
17786
17799
|
if (treeConfig && transform) {
|
|
17787
17800
|
insertTreeRow(_vm, newRecords, false);
|
|
17788
17801
|
} else {
|
|
17789
|
-
|
|
17790
|
-
|
|
17802
|
+
newRecords.forEach(item => {
|
|
17803
|
+
const rowid = getRowid($xeTable, item);
|
|
17804
|
+
const rest = {
|
|
17805
|
+
row: item,
|
|
17806
|
+
rowid,
|
|
17807
|
+
seq: -1,
|
|
17808
|
+
index: -1,
|
|
17809
|
+
_index: -1,
|
|
17810
|
+
$index: -1,
|
|
17811
|
+
items: afterFullData,
|
|
17812
|
+
parent: null,
|
|
17813
|
+
level: 0,
|
|
17814
|
+
height: 0
|
|
17815
|
+
};
|
|
17816
|
+
fullDataRowIdData[rowid] = rest;
|
|
17817
|
+
fullAllDataRowIdData[rowid] = rest;
|
|
17818
|
+
afterFullData.push(item);
|
|
17819
|
+
tableFullData.push(item);
|
|
17820
|
+
});
|
|
17791
17821
|
// 刷新单元格合并
|
|
17792
17822
|
mergeList.forEach(mergeItem => {
|
|
17793
17823
|
const {
|
|
@@ -17804,8 +17834,25 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
17804
17834
|
if (treeConfig && transform) {
|
|
17805
17835
|
insertTreeRow(_vm, newRecords, true);
|
|
17806
17836
|
} else {
|
|
17807
|
-
|
|
17808
|
-
|
|
17837
|
+
newRecords.forEach(item => {
|
|
17838
|
+
const rowid = getRowid($xeTable, item);
|
|
17839
|
+
const rest = {
|
|
17840
|
+
row: item,
|
|
17841
|
+
rowid,
|
|
17842
|
+
seq: -1,
|
|
17843
|
+
index: -1,
|
|
17844
|
+
_index: -1,
|
|
17845
|
+
$index: -1,
|
|
17846
|
+
items: afterFullData,
|
|
17847
|
+
parent: null,
|
|
17848
|
+
level: 0,
|
|
17849
|
+
height: 0
|
|
17850
|
+
};
|
|
17851
|
+
fullDataRowIdData[rowid] = rest;
|
|
17852
|
+
fullAllDataRowIdData[rowid] = rest;
|
|
17853
|
+
afterFullData.push(item);
|
|
17854
|
+
tableFullData.push(item);
|
|
17855
|
+
});
|
|
17809
17856
|
// 刷新单元格合并
|
|
17810
17857
|
mergeList.forEach(mergeItem => {
|
|
17811
17858
|
const {
|
|
@@ -17920,14 +17967,12 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
17920
17967
|
}
|
|
17921
17968
|
}
|
|
17922
17969
|
const {
|
|
17923
|
-
insertList,
|
|
17924
17970
|
insertMaps
|
|
17925
17971
|
} = editStore;
|
|
17926
17972
|
newRecords.forEach(newRow => {
|
|
17927
|
-
const rowid = getRowid(
|
|
17973
|
+
const rowid = getRowid($xeTable, newRow);
|
|
17928
17974
|
insertMaps[rowid] = newRow;
|
|
17929
17975
|
});
|
|
17930
|
-
insertList.unshift(...newRecords);
|
|
17931
17976
|
_vm.cacheRowMap();
|
|
17932
17977
|
_vm.updateScrollYStatus();
|
|
17933
17978
|
_vm.handleTableData(treeConfig && transform);
|
|
@@ -17981,18 +18026,25 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
17981
18026
|
* 如果为空则删除所有
|
|
17982
18027
|
*/
|
|
17983
18028
|
_remove(rows) {
|
|
18029
|
+
const $xeTable = this;
|
|
18030
|
+
const props = $xeTable;
|
|
18031
|
+
const reactData = $xeTable;
|
|
18032
|
+
const internalData = $xeTable;
|
|
18033
|
+
const {
|
|
18034
|
+
treeConfig
|
|
18035
|
+
} = props;
|
|
17984
18036
|
const {
|
|
17985
|
-
afterFullData,
|
|
17986
|
-
tableFullData,
|
|
17987
|
-
tableFullTreeData,
|
|
17988
|
-
treeConfig,
|
|
17989
18037
|
mergeList,
|
|
17990
18038
|
editStore,
|
|
17991
|
-
|
|
17992
|
-
|
|
17993
|
-
|
|
17994
|
-
|
|
17995
|
-
|
|
18039
|
+
selectCheckboxMaps
|
|
18040
|
+
} = reactData;
|
|
18041
|
+
const {
|
|
18042
|
+
tableFullTreeData,
|
|
18043
|
+
afterFullData,
|
|
18044
|
+
tableFullData
|
|
18045
|
+
} = internalData;
|
|
18046
|
+
const checkboxOpts = $xeTable.computeCheckboxOpts;
|
|
18047
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
17996
18048
|
const {
|
|
17997
18049
|
transform,
|
|
17998
18050
|
mapChildrenField
|
|
@@ -18001,7 +18053,6 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
18001
18053
|
const {
|
|
18002
18054
|
actived,
|
|
18003
18055
|
removeList,
|
|
18004
|
-
insertList,
|
|
18005
18056
|
insertMaps
|
|
18006
18057
|
} = editStore;
|
|
18007
18058
|
const {
|
|
@@ -18015,7 +18066,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
18015
18066
|
}
|
|
18016
18067
|
// 如果是新增,则保存记录
|
|
18017
18068
|
rows.forEach(row => {
|
|
18018
|
-
if (
|
|
18069
|
+
if (!$xeTable.isInsertByRow(row)) {
|
|
18019
18070
|
removeList.push(row);
|
|
18020
18071
|
}
|
|
18021
18072
|
});
|
|
@@ -18088,27 +18139,25 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
18088
18139
|
}
|
|
18089
18140
|
}
|
|
18090
18141
|
// 如果当前行被激活编辑,则清除激活状态
|
|
18091
|
-
if (actived.row &&
|
|
18092
|
-
|
|
18142
|
+
if (actived.row && $xeTable.findRowIndexOf(rows, actived.row) > -1) {
|
|
18143
|
+
$xeTable.clearEdit();
|
|
18093
18144
|
}
|
|
18094
18145
|
// 从新增中移除已删除的数据
|
|
18095
18146
|
rows.forEach(row => {
|
|
18096
|
-
const rowid = getRowid(
|
|
18097
|
-
|
|
18098
|
-
|
|
18099
|
-
insertList.splice(iIndex, 1);
|
|
18147
|
+
const rowid = getRowid($xeTable, row);
|
|
18148
|
+
if (insertMaps[rowid]) {
|
|
18149
|
+
delete insertMaps[rowid];
|
|
18100
18150
|
}
|
|
18101
|
-
delete insertMaps[rowid];
|
|
18102
18151
|
});
|
|
18103
|
-
|
|
18152
|
+
$xeTable.updateFooter();
|
|
18153
|
+
$xeTable.cacheRowMap();
|
|
18154
|
+
$xeTable.handleTableData(treeConfig && transform);
|
|
18104
18155
|
if (!(treeConfig && transform)) {
|
|
18105
|
-
|
|
18156
|
+
$xeTable.updateAfterDataIndex();
|
|
18106
18157
|
}
|
|
18107
|
-
|
|
18108
|
-
|
|
18109
|
-
|
|
18110
|
-
if (this.scrollYLoad) {
|
|
18111
|
-
this.updateScrollYSpace();
|
|
18158
|
+
$xeTable.checkSelectionStatus();
|
|
18159
|
+
if (reactData.scrollYLoad) {
|
|
18160
|
+
$xeTable.updateScrollYSpace();
|
|
18112
18161
|
}
|
|
18113
18162
|
return this.$nextTick().then(() => {
|
|
18114
18163
|
this.updateCellAreas();
|
|
@@ -18171,13 +18220,20 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
18171
18220
|
* 获取新增的临时数据
|
|
18172
18221
|
*/
|
|
18173
18222
|
_getInsertRecords() {
|
|
18223
|
+
const $xeTable = this;
|
|
18224
|
+
const reactData = $xeTable;
|
|
18225
|
+
const internalData = $xeTable;
|
|
18226
|
+
const {
|
|
18227
|
+
editStore
|
|
18228
|
+
} = reactData;
|
|
18174
18229
|
const {
|
|
18175
18230
|
fullAllDataRowIdData
|
|
18176
|
-
} =
|
|
18177
|
-
const
|
|
18231
|
+
} = internalData;
|
|
18232
|
+
const {
|
|
18233
|
+
insertMaps
|
|
18234
|
+
} = editStore;
|
|
18178
18235
|
const insertRecords = [];
|
|
18179
|
-
|
|
18180
|
-
const rowid = getRowid(this, row);
|
|
18236
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(insertMaps, (row, rowid) => {
|
|
18181
18237
|
if (fullAllDataRowIdData[rowid]) {
|
|
18182
18238
|
insertRecords.push(row);
|
|
18183
18239
|
}
|
|
@@ -22179,7 +22235,6 @@ function handleUupdateResize(_vm) {
|
|
|
22179
22235
|
row: null,
|
|
22180
22236
|
column: null
|
|
22181
22237
|
},
|
|
22182
|
-
insertList: [],
|
|
22183
22238
|
insertMaps: {},
|
|
22184
22239
|
removeList: [],
|
|
22185
22240
|
removeMaps: {}
|