vxe-table 3.7.0-beta.1 → 3.7.0-beta.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/helper/vetur/attributes.json +63 -19
- package/helper/vetur/tags.json +12 -1
- package/lib/export/src/mixin.js +22 -12
- package/lib/export/src/mixin.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.umd.js +75 -50
- 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/methods.js +57 -42
- package/lib/table/src/methods.min.js +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/package.json +1 -1
- package/packages/export/src/mixin.js +20 -12
- package/packages/table/src/methods.js +35 -18
- package/types/export.d.ts +1 -0
- package/types/table.d.ts +1 -0
- /package/lib/icon/style/{iconfont.1688948811910.ttf → iconfont.1689208376629.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1688948811910.woff → iconfont.1689208376629.woff} +0 -0
- /package/lib/icon/style/{iconfont.1688948811910.woff2 → iconfont.1689208376629.woff2} +0 -0
- /package/lib/{iconfont.1688948811910.ttf → iconfont.1689208376629.ttf} +0 -0
- /package/lib/{iconfont.1688948811910.woff → iconfont.1689208376629.woff} +0 -0
- /package/lib/{iconfont.1688948811910.woff2 → iconfont.1689208376629.woff2} +0 -0
|
@@ -414,7 +414,7 @@ const Methods = {
|
|
|
414
414
|
this.tableSynchData = datas
|
|
415
415
|
// 克隆原数据,用于显示编辑状态,与编辑值做对比
|
|
416
416
|
if (keepSource) {
|
|
417
|
-
this.
|
|
417
|
+
this.cacheSourceMap(fullData)
|
|
418
418
|
}
|
|
419
419
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
420
420
|
if (sYLoad) {
|
|
@@ -625,6 +625,30 @@ const Methods = {
|
|
|
625
625
|
tableFullData.forEach(handleCache)
|
|
626
626
|
}
|
|
627
627
|
},
|
|
628
|
+
cacheSourceMap (fullData) {
|
|
629
|
+
let { treeConfig, treeOpts, sourceDataRowIdData } = this
|
|
630
|
+
const sourceData = XEUtils.clone(fullData, true)
|
|
631
|
+
const rowkey = getRowkey(this)
|
|
632
|
+
sourceDataRowIdData = this.sourceDataRowIdData = {}
|
|
633
|
+
const handleSourceRow = (row) => {
|
|
634
|
+
let rowid = getRowid(this, row)
|
|
635
|
+
if (eqEmptyValue(rowid)) {
|
|
636
|
+
rowid = getRowUniqueId()
|
|
637
|
+
XEUtils.set(row, rowkey, rowid)
|
|
638
|
+
}
|
|
639
|
+
sourceDataRowIdData[rowid] = {
|
|
640
|
+
row,
|
|
641
|
+
rowid
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
// 源数据缓存
|
|
645
|
+
if (treeConfig && !treeOpts.transform) {
|
|
646
|
+
XEUtils.eachTree(sourceData, handleSourceRow, treeOpts)
|
|
647
|
+
} else {
|
|
648
|
+
sourceData.forEach(handleSourceRow)
|
|
649
|
+
}
|
|
650
|
+
this.tableSourceData = sourceData
|
|
651
|
+
},
|
|
628
652
|
loadTreeChildren (row, childRecords) {
|
|
629
653
|
const { keepSource, tableSourceData, treeOpts, fullDataRowIdData, fullDataRowMap, fullAllDataRowMap, fullAllDataRowIdData } = this
|
|
630
654
|
const { transform, children, mapChildren } = treeOpts
|
|
@@ -1061,31 +1085,21 @@ const Methods = {
|
|
|
1061
1085
|
* @param {String} field 字段名
|
|
1062
1086
|
*/
|
|
1063
1087
|
isUpdateByRow (row, field) {
|
|
1064
|
-
const { tableFullColumn, keepSource,
|
|
1088
|
+
const { tableFullColumn, keepSource, sourceDataRowIdData, fullDataRowIdData } = this
|
|
1065
1089
|
if (keepSource) {
|
|
1066
|
-
let oRow, property
|
|
1067
1090
|
const rowid = getRowid(this, row)
|
|
1068
1091
|
// 新增的数据不需要检测
|
|
1069
1092
|
if (!fullDataRowIdData[rowid]) {
|
|
1070
1093
|
return false
|
|
1071
1094
|
}
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
const
|
|
1075
|
-
row = Object.assign({}, row, { [children]: null })
|
|
1076
|
-
if (matchObj) {
|
|
1077
|
-
oRow = Object.assign({}, matchObj.item, { [children]: null })
|
|
1078
|
-
}
|
|
1079
|
-
} else {
|
|
1080
|
-
const oRowIndex = fullDataRowIdData[rowid].index
|
|
1081
|
-
oRow = tableSourceData[oRowIndex]
|
|
1082
|
-
}
|
|
1083
|
-
if (oRow) {
|
|
1095
|
+
const oldRest = sourceDataRowIdData[rowid]
|
|
1096
|
+
if (oldRest) {
|
|
1097
|
+
const oRow = oldRest.row
|
|
1084
1098
|
if (arguments.length > 1) {
|
|
1085
1099
|
return !eqCellValue(oRow, row, field)
|
|
1086
1100
|
}
|
|
1087
1101
|
for (let index = 0, len = tableFullColumn.length; index < len; index++) {
|
|
1088
|
-
property = tableFullColumn[index].field
|
|
1102
|
+
const property = tableFullColumn[index].field
|
|
1089
1103
|
if (property && !eqCellValue(oRow, row, property)) {
|
|
1090
1104
|
return true
|
|
1091
1105
|
}
|
|
@@ -1460,7 +1474,7 @@ const Methods = {
|
|
|
1460
1474
|
*/
|
|
1461
1475
|
showColumn (fieldOrColumn) {
|
|
1462
1476
|
const column = handleFieldOrColumn(this, fieldOrColumn)
|
|
1463
|
-
if (column
|
|
1477
|
+
if (column && column.visible) {
|
|
1464
1478
|
column.visible = true
|
|
1465
1479
|
return this.handleCustom()
|
|
1466
1480
|
}
|
|
@@ -3788,7 +3802,10 @@ const Methods = {
|
|
|
3788
3802
|
if (!remote || (firstSortColumn && firstSortColumn.remoteSort)) {
|
|
3789
3803
|
this.handleTableData(true)
|
|
3790
3804
|
}
|
|
3791
|
-
return this.$nextTick().then(
|
|
3805
|
+
return this.$nextTick().then(() => {
|
|
3806
|
+
this.updateCellAreas()
|
|
3807
|
+
return this.updateStyle()
|
|
3808
|
+
})
|
|
3792
3809
|
}
|
|
3793
3810
|
return this.$nextTick()
|
|
3794
3811
|
},
|
package/types/export.d.ts
CHANGED
|
@@ -231,6 +231,7 @@ export interface ColumnExportCellRenderParams extends GridRenderParams {
|
|
|
231
231
|
|
|
232
232
|
export interface ColumnExportHeaderRenderParams extends GridRenderParams {
|
|
233
233
|
column: ColumnInfo;
|
|
234
|
+
options: ExportParams;
|
|
234
235
|
}
|
|
235
236
|
|
|
236
237
|
export interface ColumnExportFooterRenderParams extends GridRenderParams {
|
package/types/table.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|