vxe-table 3.13.16 → 3.13.18
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/grid/src/grid.js +68 -85
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +25 -27
- package/es/table/module/edit/mixin.js +3 -5
- package/es/table/module/export/export-panel.js +22 -24
- package/es/table/module/export/import-panel.js +14 -16
- package/es/table/module/export/mixin.js +15 -31
- package/es/table/module/keyboard/mixin.js +3 -2
- package/es/table/module/validator/mixin.js +1 -3
- package/es/table/render/index.js +2 -4
- package/es/table/src/body.js +2 -2
- package/es/table/src/columnInfo.js +30 -32
- package/es/table/src/methods.js +113 -68
- package/es/table/src/table.js +16 -18
- package/es/table/src/util.js +5 -7
- package/es/toolbar/src/toolbar.js +18 -26
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +69 -98
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +356 -365
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +31 -33
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +3 -5
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/export-panel.js +22 -24
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +14 -16
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +15 -31
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +3 -2
- package/lib/table/module/validator/mixin.js +1 -3
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/render/index.js +2 -4
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +2 -1
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/columnInfo.js +32 -34
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +121 -65
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +13 -15
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +4 -6
- package/lib/table/src/util.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +18 -26
- 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/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +70 -85
- package/packages/table/module/custom/panel.ts +25 -27
- package/packages/table/module/edit/mixin.ts +3 -5
- package/packages/table/module/export/export-panel.ts +22 -24
- package/packages/table/module/export/import-panel.ts +14 -16
- package/packages/table/module/export/mixin.ts +15 -31
- package/packages/table/module/keyboard/mixin.ts +6 -2
- package/packages/table/module/validator/mixin.ts +1 -3
- package/packages/table/render/index.ts +2 -4
- package/packages/table/src/body.ts +2 -2
- package/packages/table/src/columnInfo.ts +30 -32
- package/packages/table/src/methods.ts +115 -66
- package/packages/table/src/table.ts +13 -15
- package/packages/table/src/util.ts +4 -6
- package/packages/toolbar/src/toolbar.ts +18 -26
- /package/es/{iconfont.1740799948632.ttf → iconfont.1741140503645.ttf} +0 -0
- /package/es/{iconfont.1740799948632.woff → iconfont.1741140503645.woff} +0 -0
- /package/es/{iconfont.1740799948632.woff2 → iconfont.1741140503645.woff2} +0 -0
- /package/lib/{iconfont.1740799948632.ttf → iconfont.1741140503645.ttf} +0 -0
- /package/lib/{iconfont.1740799948632.woff → iconfont.1741140503645.woff} +0 -0
- /package/lib/{iconfont.1740799948632.woff2 → iconfont.1741140503645.woff2} +0 -0
|
@@ -15,40 +15,38 @@ export class ColumnInfo {
|
|
|
15
15
|
const visible = XEUtils.isBoolean(_vm.visible) ? _vm.visible : true
|
|
16
16
|
const tableProps = $xetable
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
const types = ['seq', 'checkbox', 'radio', 'expand', 'html']
|
|
19
|
+
if (_vm.type && types.indexOf(_vm.type) === -1) {
|
|
20
|
+
warnLog('vxe.error.errProp', [`type=${_vm.type}`, types.join(', ')])
|
|
21
|
+
}
|
|
22
|
+
if (XEUtils.isBoolean(_vm.cellRender) || (_vm.cellRender && !XEUtils.isObject(_vm.cellRender))) {
|
|
23
|
+
warnLog('vxe.error.errProp', [`column.cell-render=${_vm.cellRender}`, 'column.cell-render={}'])
|
|
24
|
+
}
|
|
25
|
+
if (XEUtils.isBoolean(_vm.editRender) || (_vm.editRender && !XEUtils.isObject(_vm.editRender))) {
|
|
26
|
+
warnLog('vxe.error.errProp', [`column.edit-render=${_vm.editRender}`, 'column.edit-render={}'])
|
|
27
|
+
}
|
|
28
|
+
if (_vm.type === 'expand') {
|
|
29
|
+
const { treeConfig } = tableProps
|
|
30
|
+
if (treeConfig && ($xetable.treeOpts.showLine || $xetable.treeOpts.line)) {
|
|
31
|
+
errLog('vxe.error.errConflicts', ['tree-config.line', 'column.type=expand'])
|
|
28
32
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
}
|
|
34
|
+
if (_vm.remoteSort) {
|
|
35
|
+
warnLog('vxe.error.delProp', ['column.remote-sort', 'sort-config.remote'])
|
|
36
|
+
}
|
|
37
|
+
if (_vm.sortMethod) {
|
|
38
|
+
warnLog('vxe.error.delProp', ['column.sort-method', 'sort-config.sortMethod'])
|
|
39
|
+
}
|
|
40
|
+
if (formatter) {
|
|
41
|
+
if (XEUtils.isString(formatter)) {
|
|
42
|
+
const gFormatOpts = formats.get(formatter) || XEUtils[formatter]
|
|
43
|
+
if (!gFormatOpts || !XEUtils.isFunction(gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod)) {
|
|
44
|
+
errLog('vxe.error.notFormats', [formatter])
|
|
33
45
|
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if (_vm.sortMethod) {
|
|
39
|
-
warnLog('vxe.error.delProp', ['column.sort-method', 'sort-config.sortMethod'])
|
|
40
|
-
}
|
|
41
|
-
if (formatter) {
|
|
42
|
-
if (XEUtils.isString(formatter)) {
|
|
43
|
-
const gFormatOpts = formats.get(formatter) || XEUtils[formatter]
|
|
44
|
-
if (!gFormatOpts || !XEUtils.isFunction(gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod)) {
|
|
45
|
-
errLog('vxe.error.notFormats', [formatter])
|
|
46
|
-
}
|
|
47
|
-
} else if (XEUtils.isArray(formatter)) {
|
|
48
|
-
const gFormatOpts = formats.get(formatter[0]) || XEUtils[formatter[0]]
|
|
49
|
-
if (!gFormatOpts || !XEUtils.isFunction(gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod)) {
|
|
50
|
-
errLog('vxe.error.notFormats', [formatter[0]])
|
|
51
|
-
}
|
|
46
|
+
} else if (XEUtils.isArray(formatter)) {
|
|
47
|
+
const gFormatOpts = formats.get(formatter[0]) || XEUtils[formatter[0]]
|
|
48
|
+
if (!gFormatOpts || !XEUtils.isFunction(gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod)) {
|
|
49
|
+
errLog('vxe.error.notFormats', [formatter[0]])
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
52
|
}
|
|
@@ -2393,28 +2393,26 @@ const Methods = {
|
|
|
2393
2393
|
if (treeConfig) {
|
|
2394
2394
|
// 树结构自动转换
|
|
2395
2395
|
if (treeOpts.transform) {
|
|
2396
|
-
if (
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
errLog('vxe.error.reqProp', ['tree-config.mapChildrenField'])
|
|
2408
|
-
}
|
|
2409
|
-
if (childrenField === treeOpts.mapChildrenField) {
|
|
2410
|
-
errLog('vxe.error.errConflicts', ['tree-config.childrenField', 'tree-config.mapChildrenField'])
|
|
2411
|
-
}
|
|
2412
|
-
// fullData.forEach(row => {
|
|
2413
|
-
// if (row[childrenField] && row[childrenField].length) {
|
|
2414
|
-
// warnLog('vxe.error.errConflicts', ['tree-config.transform', `row.${childrenField}`])
|
|
2415
|
-
// }
|
|
2416
|
-
// })
|
|
2396
|
+
if (!treeOpts.rowField) {
|
|
2397
|
+
errLog('vxe.error.reqProp', ['table.tree-config.rowField'])
|
|
2398
|
+
}
|
|
2399
|
+
if (!treeOpts.parentField) {
|
|
2400
|
+
errLog('vxe.error.reqProp', ['table.tree-config.parentField'])
|
|
2401
|
+
}
|
|
2402
|
+
if (!childrenField) {
|
|
2403
|
+
errLog('vxe.error.reqProp', ['tree-config.childrenField'])
|
|
2404
|
+
}
|
|
2405
|
+
if (!treeOpts.mapChildrenField) {
|
|
2406
|
+
errLog('vxe.error.reqProp', ['tree-config.mapChildrenField'])
|
|
2417
2407
|
}
|
|
2408
|
+
if (childrenField === treeOpts.mapChildrenField) {
|
|
2409
|
+
errLog('vxe.error.errConflicts', ['tree-config.childrenField', 'tree-config.mapChildrenField'])
|
|
2410
|
+
}
|
|
2411
|
+
// fullData.forEach(row => {
|
|
2412
|
+
// if (row[childrenField] && row[childrenField].length) {
|
|
2413
|
+
// warnLog('vxe.error.errConflicts', ['tree-config.transform', `row.${childrenField}`])
|
|
2414
|
+
// }
|
|
2415
|
+
// })
|
|
2418
2416
|
treeData = XEUtils.toArrayTree(fullData, {
|
|
2419
2417
|
key: treeOpts.rowField,
|
|
2420
2418
|
parentKey: treeOpts.parentField,
|
|
@@ -2480,16 +2478,14 @@ const Methods = {
|
|
|
2480
2478
|
// }
|
|
2481
2479
|
// }
|
|
2482
2480
|
|
|
2483
|
-
if (
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
warnLog('vxe.error.scrollErrProp', ['table.span-method'])
|
|
2492
|
-
}
|
|
2481
|
+
if (!(this.height || this.maxHeight)) {
|
|
2482
|
+
errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}'])
|
|
2483
|
+
}
|
|
2484
|
+
// if (!this.showOverflow) {
|
|
2485
|
+
// warnLog('vxe.error.reqProp', ['table.show-overflow'])
|
|
2486
|
+
// }
|
|
2487
|
+
if (this.spanMethod) {
|
|
2488
|
+
warnLog('vxe.error.scrollErrProp', ['table.span-method'])
|
|
2493
2489
|
}
|
|
2494
2490
|
}
|
|
2495
2491
|
|
|
@@ -2634,17 +2630,19 @@ const Methods = {
|
|
|
2634
2630
|
cacheRowMap () {
|
|
2635
2631
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
2636
2632
|
const props = $xeTable
|
|
2633
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
2637
2634
|
const internalData = $xeTable as unknown as TableInternalData
|
|
2638
2635
|
|
|
2639
2636
|
const { treeConfig } = props
|
|
2640
|
-
const
|
|
2637
|
+
const { treeExpandedMaps } = reactData
|
|
2641
2638
|
const { fullAllDataRowIdData, tableFullData, tableFullTreeData } = internalData
|
|
2639
|
+
const treeOpts = $xeTable.computeTreeOpts
|
|
2642
2640
|
const childrenField = treeOpts.children || treeOpts.childrenField
|
|
2643
2641
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField
|
|
2644
2642
|
const rowkey = getRowkey($xeTable)
|
|
2645
|
-
const
|
|
2646
|
-
const fullAllDataRowIdMaps: Record<string, VxeTableDefines.RowCacheItem> = {}
|
|
2643
|
+
const fullAllDataRowIdMaps: Record<string, VxeTableDefines.RowCacheItem> = { ...fullAllDataRowIdData } // 存在已删除数据
|
|
2647
2644
|
const fullDataRowIdMaps: Record<string, VxeTableDefines.RowCacheItem> = {}
|
|
2645
|
+
const treeTempExpandedMaps = { ...treeExpandedMaps }
|
|
2648
2646
|
const handleRow = (row: any, index: number, items: any, path?: any[], parentRow?: any, nodes?: any[]) => {
|
|
2649
2647
|
let rowid = getRowid($xeTable, row)
|
|
2650
2648
|
const seq = treeConfig && path ? toTreePathSeq(path) : index + 1
|
|
@@ -2653,13 +2651,24 @@ const Methods = {
|
|
|
2653
2651
|
rowid = getRowUniqueId()
|
|
2654
2652
|
XEUtils.set(row, rowkey, rowid)
|
|
2655
2653
|
}
|
|
2656
|
-
if (
|
|
2657
|
-
|
|
2654
|
+
if (treeConfig && treeOpts.lazy) {
|
|
2655
|
+
const treeExpRest = treeExpandedMaps[rowid]
|
|
2656
|
+
if (row[hasChildField] && XEUtils.isUndefined(row[childrenField])) {
|
|
2657
|
+
row[childrenField] = null
|
|
2658
|
+
}
|
|
2659
|
+
if (treeExpRest) {
|
|
2660
|
+
if (!row[childrenField] || !row[childrenField].length) {
|
|
2661
|
+
delete treeTempExpandedMaps[rowid]
|
|
2662
|
+
}
|
|
2663
|
+
}
|
|
2658
2664
|
}
|
|
2659
2665
|
let rowRest = fullAllDataRowIdData[rowid]
|
|
2660
2666
|
if (!rowRest) {
|
|
2661
2667
|
rowRest = { row, rowid, seq, index: -1, _index: -1, $index: -1, treeIndex: index, items, parent: parentRow, level, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 }
|
|
2662
2668
|
}
|
|
2669
|
+
rowRest.treeLoaded = false
|
|
2670
|
+
rowRest.expandLoaded = false
|
|
2671
|
+
|
|
2663
2672
|
rowRest.row = row
|
|
2664
2673
|
rowRest.items = items
|
|
2665
2674
|
rowRest.parent = parentRow
|
|
@@ -2668,13 +2677,14 @@ const Methods = {
|
|
|
2668
2677
|
fullDataRowIdMaps[rowid] = rowRest
|
|
2669
2678
|
fullAllDataRowIdMaps[rowid] = rowRest
|
|
2670
2679
|
}
|
|
2671
|
-
internalData.fullDataRowIdData = fullDataRowIdMaps
|
|
2672
|
-
internalData.fullAllDataRowIdData = fullAllDataRowIdMaps
|
|
2673
2680
|
if (treeConfig) {
|
|
2674
2681
|
XEUtils.eachTree(tableFullTreeData, handleRow, { children: childrenField })
|
|
2675
2682
|
} else {
|
|
2676
2683
|
tableFullData.forEach(handleRow)
|
|
2677
2684
|
}
|
|
2685
|
+
internalData.fullDataRowIdData = fullDataRowIdMaps
|
|
2686
|
+
internalData.fullAllDataRowIdData = fullAllDataRowIdMaps
|
|
2687
|
+
reactData.treeExpandedMaps = treeTempExpandedMaps
|
|
2678
2688
|
},
|
|
2679
2689
|
cacheSourceMap (fullData: any[]) {
|
|
2680
2690
|
let { treeConfig, treeOpts, sourceDataRowIdData } = this
|
|
@@ -3010,12 +3020,20 @@ const Methods = {
|
|
|
3010
3020
|
* 如果还额外传了 field 则还原指定的单元格数据
|
|
3011
3021
|
*/
|
|
3012
3022
|
revertData (rows: any, field: any) {
|
|
3013
|
-
const
|
|
3023
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
3024
|
+
const props = $xeTable
|
|
3025
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
3026
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
3027
|
+
|
|
3028
|
+
const { keepSource, treeConfig } = props
|
|
3029
|
+
const { fullAllDataRowIdData, tableSourceData, sourceDataRowIdData, tableFullData, afterFullData } = internalData
|
|
3030
|
+
const treeOpts = $xeTable.computeTreeOpts
|
|
3031
|
+
const { transform } = treeOpts
|
|
3014
3032
|
if (!keepSource) {
|
|
3015
3033
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
3016
3034
|
warnLog('vxe.error.reqProp', ['keep-source'])
|
|
3017
3035
|
}
|
|
3018
|
-
return
|
|
3036
|
+
return $xeTable.$nextTick()
|
|
3019
3037
|
}
|
|
3020
3038
|
let targetRows = rows
|
|
3021
3039
|
if (rows) {
|
|
@@ -3023,30 +3041,52 @@ const Methods = {
|
|
|
3023
3041
|
targetRows = [rows]
|
|
3024
3042
|
}
|
|
3025
3043
|
} else {
|
|
3026
|
-
targetRows = XEUtils.toArray(
|
|
3044
|
+
targetRows = XEUtils.toArray($xeTable.getUpdateRecords())
|
|
3027
3045
|
}
|
|
3046
|
+
let reDelFlag = false
|
|
3028
3047
|
if (targetRows.length) {
|
|
3029
3048
|
targetRows.forEach((row: any) => {
|
|
3030
|
-
if (
|
|
3031
|
-
const
|
|
3032
|
-
|
|
3033
|
-
errLog('vxe.error.noTree', ['revertData'])
|
|
3034
|
-
}
|
|
3035
|
-
const oRow = tableSourceData[rowIndex]
|
|
3049
|
+
if (!$xeTable.isInsertByRow(row)) {
|
|
3050
|
+
const rowid = getRowid($xeTable, row)
|
|
3051
|
+
const oRow = sourceDataRowIdData[rowid]
|
|
3036
3052
|
if (oRow && row) {
|
|
3037
3053
|
if (field) {
|
|
3038
3054
|
XEUtils.set(row, field, XEUtils.clone(XEUtils.get(oRow, field), true))
|
|
3039
3055
|
} else {
|
|
3040
3056
|
XEUtils.destructuring(row, XEUtils.clone(oRow, true))
|
|
3041
3057
|
}
|
|
3058
|
+
if ($xeTable.isRemoveByRow(row)) {
|
|
3059
|
+
const rowRest = fullAllDataRowIdData[rowid]
|
|
3060
|
+
if (rowRest) {
|
|
3061
|
+
const reRow = rowRest.row
|
|
3062
|
+
tableFullData.unshift(reRow)
|
|
3063
|
+
afterFullData.unshift(reRow)
|
|
3064
|
+
reDelFlag = true
|
|
3065
|
+
}
|
|
3066
|
+
}
|
|
3042
3067
|
}
|
|
3043
3068
|
}
|
|
3044
3069
|
})
|
|
3045
3070
|
}
|
|
3046
3071
|
if (rows) {
|
|
3047
|
-
|
|
3072
|
+
if (reDelFlag) {
|
|
3073
|
+
$xeTable.updateFooter()
|
|
3074
|
+
$xeTable.cacheRowMap(false)
|
|
3075
|
+
$xeTable.handleTableData(treeConfig && transform)
|
|
3076
|
+
if (!(treeConfig && transform)) {
|
|
3077
|
+
$xeTable.updateAfterDataIndex()
|
|
3078
|
+
}
|
|
3079
|
+
$xeTable.checkSelectionStatus()
|
|
3080
|
+
if (reactData.scrollYLoad) {
|
|
3081
|
+
$xeTable.updateScrollYSpace()
|
|
3082
|
+
}
|
|
3083
|
+
}
|
|
3084
|
+
return $xeTable.$nextTick().then(() => {
|
|
3085
|
+
$xeTable.updateCellAreas()
|
|
3086
|
+
return $xeTable.recalculate()
|
|
3087
|
+
})
|
|
3048
3088
|
}
|
|
3049
|
-
return
|
|
3089
|
+
return $xeTable.reloadData(tableSourceData)
|
|
3050
3090
|
},
|
|
3051
3091
|
/**
|
|
3052
3092
|
* 清空单元格内容
|
|
@@ -3162,17 +3202,28 @@ const Methods = {
|
|
|
3162
3202
|
* @param {Row} row 行对象
|
|
3163
3203
|
*/
|
|
3164
3204
|
isInsertByRow (row: any) {
|
|
3165
|
-
const
|
|
3166
|
-
const
|
|
3205
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
3206
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
3207
|
+
|
|
3208
|
+
const { editStore } = reactData
|
|
3209
|
+
const rowid = getRowid($xeTable, row)
|
|
3167
3210
|
return !!editStore.insertMaps[rowid]
|
|
3168
3211
|
},
|
|
3212
|
+
isRemoveByRow (row: any) {
|
|
3213
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
3214
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
3215
|
+
|
|
3216
|
+
const { editStore } = reactData
|
|
3217
|
+
const rowid = getRowid($xeTable, row)
|
|
3218
|
+
return !!editStore.removeMaps[rowid]
|
|
3219
|
+
},
|
|
3169
3220
|
/**
|
|
3170
3221
|
* 删除所有新增的临时数据
|
|
3171
3222
|
* @returns
|
|
3172
3223
|
*/
|
|
3173
3224
|
removeInsertRow () {
|
|
3174
|
-
const $xeTable = this
|
|
3175
|
-
const reactData = $xeTable
|
|
3225
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
3226
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
3176
3227
|
|
|
3177
3228
|
const { editStore } = reactData
|
|
3178
3229
|
editStore.insertMaps = {}
|
|
@@ -9016,19 +9067,17 @@ const funcs = 'setFilter,openFilter,clearFilter,saveFilterPanel,resetFilterPanel
|
|
|
9016
9067
|
|
|
9017
9068
|
funcs.forEach(name => {
|
|
9018
9069
|
Methods[name] = function (...args: any[]) {
|
|
9019
|
-
if (
|
|
9020
|
-
if (
|
|
9021
|
-
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
errLog('vxe.error.reqModule', ['VxeTableCustomModule'])
|
|
9031
|
-
}
|
|
9070
|
+
if (!this[`_${name}`]) {
|
|
9071
|
+
if ('openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',').includes(name)) {
|
|
9072
|
+
errLog('vxe.error.reqModule', ['VxeTableExportModule'])
|
|
9073
|
+
} else if ('fullValidate,validate'.split(',').includes(name)) {
|
|
9074
|
+
errLog('vxe.error.reqModule', ['VxeTableValidatorModule'])
|
|
9075
|
+
} else if ('setFilter,openFilter,clearFilter,getCheckedFilters'.split(',').includes(name)) {
|
|
9076
|
+
errLog('vxe.error.reqModule', ['VxeTableFilterModule'])
|
|
9077
|
+
} else if ('insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell'.split(',').includes(name)) {
|
|
9078
|
+
errLog('vxe.error.reqModule', ['VxeTableEditModule'])
|
|
9079
|
+
} else if ('openCustom'.split(',').includes(name)) {
|
|
9080
|
+
errLog('vxe.error.reqModule', ['VxeTableCustomModule'])
|
|
9032
9081
|
}
|
|
9033
9082
|
}
|
|
9034
9083
|
return this[`_${name}`] ? this[`_${name}`](...args) : null
|
|
@@ -1577,27 +1577,25 @@ export default {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
}
|
|
1579
1579
|
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
const VxeUITooltipComponent = VxeUI.getComponent<VxeTooltipComponent>('VxeTooltip')
|
|
1580
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
1581
|
+
const VxeUILoadingComponent = VxeUI.getComponent<VxeLoadingComponent>('VxeLoading')
|
|
1582
|
+
const VxeUITooltipComponent = VxeUI.getComponent<VxeTooltipComponent>('VxeTooltip')
|
|
1584
1583
|
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
}
|
|
1584
|
+
$xeTable.$nextTick(() => {
|
|
1585
|
+
if (props.loading) {
|
|
1586
|
+
if (!VxeUILoadingComponent && !this.$scopedSlots.loading) {
|
|
1587
|
+
errLog('vxe.error.reqComp', ['vxe-loading'])
|
|
1590
1588
|
}
|
|
1591
|
-
|
|
1589
|
+
}
|
|
1590
|
+
if ((props.showOverflow === true || props.showOverflow === 'tooltip') ||
|
|
1592
1591
|
(props.showHeaderOverflow === true || props.showHeaderOverflow === 'tooltip') ||
|
|
1593
1592
|
(props.showFooterOverflow === true || props.showFooterOverflow === 'tooltip') ||
|
|
1594
1593
|
props.tooltipConfig || props.editRules) {
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
}
|
|
1594
|
+
if (!VxeUITooltipComponent) {
|
|
1595
|
+
errLog('vxe.error.reqComp', ['vxe-tooltip'])
|
|
1598
1596
|
}
|
|
1599
|
-
}
|
|
1600
|
-
}
|
|
1597
|
+
}
|
|
1598
|
+
})
|
|
1601
1599
|
if (this.autoResize) {
|
|
1602
1600
|
const resizeObserver = globalResize.create(() => {
|
|
1603
1601
|
if (this.autoResize) {
|
|
@@ -151,12 +151,10 @@ export function assembleColumn (_vm: any) {
|
|
|
151
151
|
const { $el, $xetable, $xecolumn, columnConfig } = _vm
|
|
152
152
|
const groupConfig = $xecolumn ? $xecolumn.columnConfig : null
|
|
153
153
|
if (groupConfig) {
|
|
154
|
-
if (
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
warnLog('vxe.error.groupTag', [`<vxe-colgroup title=${$xecolumn.title} ...>`, `<vxe-column title=${$xecolumn.title} ...>`])
|
|
159
|
-
}
|
|
154
|
+
if ($xecolumn.$options._componentTag === 'vxe-table-column') {
|
|
155
|
+
errLog('vxe.error.groupTag', [`<vxe-table-colgroup title=${$xecolumn.title} ...>`, `<vxe-table-column title=${$xecolumn.title} ...>`])
|
|
156
|
+
} else if ($xecolumn.$options._componentTag === 'vxe-column') {
|
|
157
|
+
warnLog('vxe.error.groupTag', [`<vxe-colgroup title=${$xecolumn.title} ...>`, `<vxe-column title=${$xecolumn.title} ...>`])
|
|
160
158
|
}
|
|
161
159
|
if (!groupConfig.children) {
|
|
162
160
|
groupConfig.children = []
|
|
@@ -255,9 +255,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
255
255
|
if (tCommandMethod) {
|
|
256
256
|
tCommandMethod(params)
|
|
257
257
|
} else {
|
|
258
|
-
|
|
259
|
-
errLog('vxe.error.notCommands', [code])
|
|
260
|
-
}
|
|
258
|
+
errLog('vxe.error.notCommands', [code])
|
|
261
259
|
}
|
|
262
260
|
}
|
|
263
261
|
$xeToolbar.dispatchEvent('button-click', params, evnt)
|
|
@@ -283,9 +281,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
283
281
|
if (tCommandMethod) {
|
|
284
282
|
tCommandMethod(params)
|
|
285
283
|
} else {
|
|
286
|
-
|
|
287
|
-
errLog('vxe.error.notCommands', [code])
|
|
288
|
-
}
|
|
284
|
+
errLog('vxe.error.notCommands', [code])
|
|
289
285
|
}
|
|
290
286
|
}
|
|
291
287
|
$xeToolbar.dispatchEvent('tool-click', params, evnt)
|
|
@@ -732,30 +728,26 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
732
728
|
$xetable.connect(this)
|
|
733
729
|
}
|
|
734
730
|
const customOpts = $xeToolbar.computeCustomOpts
|
|
735
|
-
if (
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
warnLog('vxe.error.delProp', ['toolbar.custom.trigger', 'table.custom-config.trigger'])
|
|
747
|
-
}
|
|
731
|
+
if (customOpts.isFooter) {
|
|
732
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.isFooter', 'table.custom-config.showFooter'])
|
|
733
|
+
}
|
|
734
|
+
if (customOpts.showFooter) {
|
|
735
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.showFooter', 'table.custom-config.showFooter'])
|
|
736
|
+
}
|
|
737
|
+
if (customOpts.immediate) {
|
|
738
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.immediate', 'table.custom-config.immediate'])
|
|
739
|
+
}
|
|
740
|
+
if (customOpts.trigger) {
|
|
741
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.trigger', 'table.custom-config.trigger'])
|
|
748
742
|
}
|
|
749
743
|
})
|
|
750
744
|
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
const VxeUIButtonComponent = VxeUI.getComponent<VxeButtonComponent>('VxeButton')
|
|
745
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
746
|
+
const VxeUIButtonComponent = VxeUI.getComponent<VxeButtonComponent>('VxeButton')
|
|
754
747
|
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
}
|
|
748
|
+
if (props.refresh || props.import || props.export || props.print || props.zoom) {
|
|
749
|
+
if (!VxeUIButtonComponent) {
|
|
750
|
+
errLog('vxe.error.reqComp', ['vxe-button'])
|
|
759
751
|
}
|
|
760
752
|
}
|
|
761
753
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|