vxe-table 4.7.6 → 4.7.7
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 +10 -9
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/hook.js +8 -15
- package/es/table/module/custom/panel.js +166 -102
- package/es/table/module/edit/hook.js +11 -10
- package/es/table/module/export/hook.js +14 -11
- package/es/table/module/validator/hook.js +6 -5
- package/es/table/render/index.js +3 -2
- package/es/table/src/columnInfo.js +10 -8
- package/es/table/src/table.js +140 -80
- package/es/table/style.css +39 -8
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +12 -11
- package/es/ui/index.js +6 -3
- package/es/ui/src/log.js +5 -0
- package/es/vxe-table/style.css +39 -8
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +9 -9
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +326 -201
- 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/custom/hook.js +8 -17
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +96 -42
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +10 -10
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/hook.js +14 -12
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/validator/hook.js +6 -6
- package/lib/table/module/validator/hook.min.js +1 -1
- package/lib/table/render/index.js +3 -3
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/columnInfo.js +10 -9
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/table.js +146 -80
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +39 -8
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +11 -11
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +6 -3
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +13 -0
- package/lib/ui/src/log.min.js +1 -0
- package/lib/vxe-table/style/style.css +39 -8
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +10 -9
- package/packages/table/module/custom/hook.ts +10 -17
- package/packages/table/module/custom/panel.ts +166 -104
- package/packages/table/module/edit/hook.ts +11 -10
- package/packages/table/module/export/hook.ts +18 -13
- package/packages/table/module/validator/hook.ts +6 -5
- package/packages/table/render/index.ts +3 -2
- package/packages/table/src/columnInfo.ts +11 -8
- package/packages/table/src/table.ts +139 -80
- package/packages/toolbar/src/toolbar.ts +12 -11
- package/packages/ui/index.ts +4 -1
- package/packages/ui/src/log.ts +8 -0
- package/styles/components/table-module/custom.scss +41 -7
- package/styles/components/table.scss +1 -0
|
@@ -11,6 +11,7 @@ import tableProps from './props'
|
|
|
11
11
|
import tableEmits from './emits'
|
|
12
12
|
import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, restoreScrollListener, XEBodyScrollElement, getRootColumn } from './util'
|
|
13
13
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
14
|
+
import { warnLog, errLog } from '../../ui/src/log'
|
|
14
15
|
import TableCustomPanelComponent from '../module/custom/panel'
|
|
15
16
|
import TableFilterPanelComponent from '../module/filter/panel'
|
|
16
17
|
import TableImportPanelComponent from '../module/export/import-panel'
|
|
@@ -19,7 +20,7 @@ import TableMenuPanelComponent from '../module/menu/panel'
|
|
|
19
20
|
|
|
20
21
|
import type { VxeGridConstructor, VxeGridPrivateMethods, VxeTableConstructor, TableReactData, TableInternalData, VxeTablePropTypes, VxeToolbarConstructor, TablePrivateMethods, VxeTablePrivateRef, VxeTablePrivateComputed, VxeTablePrivateMethods, TableMethods, VxeTableMethods, VxeTableDefines, VxeTableProps, VxeColumnPropTypes, VxeLoadingComponent, VxeTooltipInstance, VxeTooltipComponent } from '../../../types'
|
|
21
22
|
|
|
22
|
-
const { getConfig, getI18n, renderer, formats, createEvent, globalResize, interceptor, hooks, globalEvents, GLOBAL_EVENT_KEYS,
|
|
23
|
+
const { getConfig, getI18n, renderer, formats, createEvent, globalResize, interceptor, hooks, globalEvents, GLOBAL_EVENT_KEYS, useFns } = VxeUI
|
|
23
24
|
|
|
24
25
|
const isWebkit = browse['-webkit'] && !browse.edge
|
|
25
26
|
|
|
@@ -787,7 +788,7 @@ export default defineComponent({
|
|
|
787
788
|
merges = [merges]
|
|
788
789
|
}
|
|
789
790
|
if (treeConfig && merges.length) {
|
|
790
|
-
|
|
791
|
+
errLog('vxe.error.noTree', ['merge-cells | merge-footer-items'])
|
|
791
792
|
}
|
|
792
793
|
merges.forEach((item) => {
|
|
793
794
|
let { row, col, rowspan, colspan } = item
|
|
@@ -837,7 +838,7 @@ export default defineComponent({
|
|
|
837
838
|
merges = [merges]
|
|
838
839
|
}
|
|
839
840
|
if (treeConfig && merges.length) {
|
|
840
|
-
|
|
841
|
+
errLog('vxe.error.noTree', ['merge-cells | merge-footer-items'])
|
|
841
842
|
}
|
|
842
843
|
merges.forEach((item) => {
|
|
843
844
|
let { row, col } = item
|
|
@@ -911,7 +912,7 @@ export default defineComponent({
|
|
|
911
912
|
}
|
|
912
913
|
} = {}
|
|
913
914
|
if (!id) {
|
|
914
|
-
|
|
915
|
+
errLog('vxe.error.reqProp', ['id'])
|
|
915
916
|
return
|
|
916
917
|
}
|
|
917
918
|
// 自定义列宽
|
|
@@ -1039,7 +1040,7 @@ export default defineComponent({
|
|
|
1039
1040
|
if (field) {
|
|
1040
1041
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
1041
1042
|
if (fullColumnFieldData[field]) {
|
|
1042
|
-
|
|
1043
|
+
warnLog('vxe.error.colRepet', ['field', field])
|
|
1043
1044
|
}
|
|
1044
1045
|
}
|
|
1045
1046
|
fullColumnFieldData[field] = rest
|
|
@@ -1053,7 +1054,7 @@ export default defineComponent({
|
|
|
1053
1054
|
if (treeNode) {
|
|
1054
1055
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
1055
1056
|
if (treeNodeColumn) {
|
|
1056
|
-
|
|
1057
|
+
warnLog('vxe.error.colRepet', ['tree-node', treeNode])
|
|
1057
1058
|
}
|
|
1058
1059
|
}
|
|
1059
1060
|
if (!treeNodeColumn) {
|
|
@@ -1062,7 +1063,7 @@ export default defineComponent({
|
|
|
1062
1063
|
} else if (type === 'expand') {
|
|
1063
1064
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
1064
1065
|
if (expandColumn) {
|
|
1065
|
-
|
|
1066
|
+
warnLog('vxe.error.colRepet', ['type', type])
|
|
1066
1067
|
}
|
|
1067
1068
|
}
|
|
1068
1069
|
if (!expandColumn) {
|
|
@@ -1072,14 +1073,14 @@ export default defineComponent({
|
|
|
1072
1073
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
1073
1074
|
if (type === 'checkbox') {
|
|
1074
1075
|
if (checkboxColumn) {
|
|
1075
|
-
|
|
1076
|
+
warnLog('vxe.error.colRepet', ['type', type])
|
|
1076
1077
|
}
|
|
1077
1078
|
if (!checkboxColumn) {
|
|
1078
1079
|
checkboxColumn = column
|
|
1079
1080
|
}
|
|
1080
1081
|
} else if (type === 'radio') {
|
|
1081
1082
|
if (radioColumn) {
|
|
1082
|
-
|
|
1083
|
+
warnLog('vxe.error.colRepet', ['type', type])
|
|
1083
1084
|
}
|
|
1084
1085
|
if (!radioColumn) {
|
|
1085
1086
|
radioColumn = column
|
|
@@ -1090,7 +1091,7 @@ export default defineComponent({
|
|
|
1090
1091
|
isAllOverflow = false
|
|
1091
1092
|
}
|
|
1092
1093
|
if (fullColumnIdData[colid]) {
|
|
1093
|
-
|
|
1094
|
+
errLog('vxe.error.colRepet', ['colId', colid])
|
|
1094
1095
|
}
|
|
1095
1096
|
fullColumnIdData[colid] = rest
|
|
1096
1097
|
}
|
|
@@ -1105,17 +1106,17 @@ export default defineComponent({
|
|
|
1105
1106
|
|
|
1106
1107
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
1107
1108
|
if (expandColumn && mouseOpts.area) {
|
|
1108
|
-
|
|
1109
|
+
errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand'])
|
|
1109
1110
|
}
|
|
1110
1111
|
}
|
|
1111
1112
|
|
|
1112
1113
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
1113
1114
|
if (htmlColumn) {
|
|
1114
1115
|
if (!columnOpts.useKey) {
|
|
1115
|
-
|
|
1116
|
+
errLog('vxe.error.reqProp', ['column-config.useKey', 'column.type=html'])
|
|
1116
1117
|
}
|
|
1117
1118
|
if (!rowOpts.useKey) {
|
|
1118
|
-
|
|
1119
|
+
errLog('vxe.error.reqProp', ['row-config.useKey', 'column.type=html'])
|
|
1119
1120
|
}
|
|
1120
1121
|
}
|
|
1121
1122
|
}
|
|
@@ -2262,23 +2263,23 @@ export default defineComponent({
|
|
|
2262
2263
|
// 树结构自动转换
|
|
2263
2264
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
2264
2265
|
if (!treeOpts.rowField) {
|
|
2265
|
-
|
|
2266
|
+
errLog('vxe.error.reqProp', ['tree-config.rowField'])
|
|
2266
2267
|
}
|
|
2267
2268
|
if (!treeOpts.parentField) {
|
|
2268
|
-
|
|
2269
|
+
errLog('vxe.error.reqProp', ['tree-config.parentField'])
|
|
2269
2270
|
}
|
|
2270
2271
|
if (!childrenField) {
|
|
2271
|
-
|
|
2272
|
+
errLog('vxe.error.reqProp', ['tree-config.childrenField'])
|
|
2272
2273
|
}
|
|
2273
2274
|
if (!treeOpts.mapChildrenField) {
|
|
2274
|
-
|
|
2275
|
+
errLog('vxe.error.reqProp', ['tree-config.mapChildrenField'])
|
|
2275
2276
|
}
|
|
2276
2277
|
if (childrenField === treeOpts.mapChildrenField) {
|
|
2277
|
-
|
|
2278
|
+
errLog('vxe.error.errConflicts', ['tree-config.childrenField', 'tree-config.mapChildrenField'])
|
|
2278
2279
|
}
|
|
2279
2280
|
// fullData.forEach(row => {
|
|
2280
2281
|
// if (row[treeOpts.children] && row[treeOpts.children].length) {
|
|
2281
|
-
//
|
|
2282
|
+
// warnLog('vxe.error.errConflicts', ['tree-config.transform', `row.${treeOpts.children}`])
|
|
2282
2283
|
// }
|
|
2283
2284
|
// })
|
|
2284
2285
|
}
|
|
@@ -2316,13 +2317,13 @@ export default defineComponent({
|
|
|
2316
2317
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
2317
2318
|
if (sYLoad) {
|
|
2318
2319
|
if (!(props.height || props.maxHeight)) {
|
|
2319
|
-
|
|
2320
|
+
errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}'])
|
|
2320
2321
|
}
|
|
2321
2322
|
if (!props.showOverflow) {
|
|
2322
|
-
|
|
2323
|
+
warnLog('vxe.error.reqProp', ['table.show-overflow'])
|
|
2323
2324
|
}
|
|
2324
2325
|
if (props.spanMethod) {
|
|
2325
|
-
|
|
2326
|
+
warnLog('vxe.error.scrollErrProp', ['table.span-method'])
|
|
2326
2327
|
}
|
|
2327
2328
|
}
|
|
2328
2329
|
}
|
|
@@ -2457,7 +2458,7 @@ export default defineComponent({
|
|
|
2457
2458
|
column.fixed = parent.fixed
|
|
2458
2459
|
}
|
|
2459
2460
|
if (parent && column.fixed !== parent.fixed) {
|
|
2460
|
-
|
|
2461
|
+
errLog('vxe.error.groupFixed')
|
|
2461
2462
|
}
|
|
2462
2463
|
if (isColGroup) {
|
|
2463
2464
|
column.visible = !!XEUtils.findTree(column.children, (subColumn) => hasChildrenList(subColumn) ? false : subColumn.visible)
|
|
@@ -2505,16 +2506,16 @@ export default defineComponent({
|
|
|
2505
2506
|
if (scrollXLoad) {
|
|
2506
2507
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
2507
2508
|
// if (props.showHeader && !props.showHeaderOverflow) {
|
|
2508
|
-
//
|
|
2509
|
+
// warnLog('vxe.error.reqProp', ['show-header-overflow'])
|
|
2509
2510
|
// }
|
|
2510
2511
|
// if (props.showFooter && !props.showFooterOverflow) {
|
|
2511
|
-
//
|
|
2512
|
+
// warnLog('vxe.error.reqProp', ['show-footer-overflow'])
|
|
2512
2513
|
// }
|
|
2513
2514
|
if (props.spanMethod) {
|
|
2514
|
-
|
|
2515
|
+
warnLog('vxe.error.scrollErrProp', ['span-method'])
|
|
2515
2516
|
}
|
|
2516
2517
|
if (props.footerSpanMethod) {
|
|
2517
|
-
|
|
2518
|
+
warnLog('vxe.error.scrollErrProp', ['footer-span-method'])
|
|
2518
2519
|
}
|
|
2519
2520
|
}
|
|
2520
2521
|
const { visibleSize } = computeVirtualX()
|
|
@@ -2572,7 +2573,7 @@ export default defineComponent({
|
|
|
2572
2573
|
tablePrivateMethods.handleTableData(true)
|
|
2573
2574
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
2574
2575
|
if ((reactData.scrollXLoad || reactData.scrollYLoad) && reactData.expandColumn) {
|
|
2575
|
-
|
|
2576
|
+
warnLog('vxe.error.scrollErrProp', ['column.type=expand'])
|
|
2576
2577
|
}
|
|
2577
2578
|
}
|
|
2578
2579
|
return nextTick().then(() => {
|
|
@@ -2748,7 +2749,7 @@ export default defineComponent({
|
|
|
2748
2749
|
* 对于某些特殊的场景,比如深层树节点元素发生变动时可能会用到
|
|
2749
2750
|
*/
|
|
2750
2751
|
syncData () {
|
|
2751
|
-
|
|
2752
|
+
warnLog('vxe.error.delFunc', ['syncData', 'getData'])
|
|
2752
2753
|
return nextTick().then(() => {
|
|
2753
2754
|
reactData.tableData = []
|
|
2754
2755
|
emit('update:data', internalData.tableFullData)
|
|
@@ -2858,7 +2859,7 @@ export default defineComponent({
|
|
|
2858
2859
|
reactData.tableData = tableData.slice(0)
|
|
2859
2860
|
} else {
|
|
2860
2861
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
2861
|
-
|
|
2862
|
+
warnLog('vxe.error.reqProp', ['keep-source'])
|
|
2862
2863
|
}
|
|
2863
2864
|
}
|
|
2864
2865
|
return nextTick()
|
|
@@ -3023,7 +3024,7 @@ export default defineComponent({
|
|
|
3023
3024
|
const { tableSourceData, sourceDataRowIdData } = internalData
|
|
3024
3025
|
if (!keepSource) {
|
|
3025
3026
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
3026
|
-
|
|
3027
|
+
warnLog('vxe.error.reqProp', ['keep-source'])
|
|
3027
3028
|
}
|
|
3028
3029
|
return nextTick()
|
|
3029
3030
|
}
|
|
@@ -3375,6 +3376,7 @@ export default defineComponent({
|
|
|
3375
3376
|
if (!checkMethod || checkMethod({ column })) {
|
|
3376
3377
|
column.visible = column.defaultVisible
|
|
3377
3378
|
}
|
|
3379
|
+
column.renderResizeWidth = column.renderWidth
|
|
3378
3380
|
})
|
|
3379
3381
|
if (opts.resizable) {
|
|
3380
3382
|
tablePrivateMethods.saveCustomResizable(true)
|
|
@@ -3997,7 +3999,7 @@ export default defineComponent({
|
|
|
3997
3999
|
},
|
|
3998
4000
|
reloadExpandContent (row) {
|
|
3999
4001
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
4000
|
-
|
|
4002
|
+
warnLog('vxe.error.delFunc', ['reloadExpandContent', 'reloadRowExpand'])
|
|
4001
4003
|
}
|
|
4002
4004
|
// 即将废弃
|
|
4003
4005
|
return tableMethods.reloadRowExpand(row)
|
|
@@ -4092,7 +4094,7 @@ export default defineComponent({
|
|
|
4092
4094
|
isExpandByRow (row) {
|
|
4093
4095
|
// 已废弃
|
|
4094
4096
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
4095
|
-
|
|
4097
|
+
warnLog('vxe.error.delFunc', ['isExpandByRow', 'isRowExpandByRow'])
|
|
4096
4098
|
}
|
|
4097
4099
|
return tableMethods.isRowExpandByRow(row)
|
|
4098
4100
|
},
|
|
@@ -4190,7 +4192,7 @@ export default defineComponent({
|
|
|
4190
4192
|
},
|
|
4191
4193
|
reloadTreeChilds (row) {
|
|
4192
4194
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
4193
|
-
|
|
4195
|
+
warnLog('vxe.error.delFunc', ['reloadTreeChilds', 'reloadTreeExpand'])
|
|
4194
4196
|
}
|
|
4195
4197
|
// 即将废弃
|
|
4196
4198
|
return tableMethods.reloadTreeExpand(row)
|
|
@@ -4443,7 +4445,7 @@ export default defineComponent({
|
|
|
4443
4445
|
*/
|
|
4444
4446
|
setMergeCells (merges) {
|
|
4445
4447
|
if (props.spanMethod) {
|
|
4446
|
-
|
|
4448
|
+
errLog('vxe.error.errConflicts', ['merge-cells', 'span-method'])
|
|
4447
4449
|
}
|
|
4448
4450
|
setMerges(merges, reactData.mergeList, internalData.afterFullData)
|
|
4449
4451
|
return nextTick().then(() => {
|
|
@@ -4457,7 +4459,7 @@ export default defineComponent({
|
|
|
4457
4459
|
*/
|
|
4458
4460
|
removeMergeCells (merges) {
|
|
4459
4461
|
if (props.spanMethod) {
|
|
4460
|
-
|
|
4462
|
+
errLog('vxe.error.errConflicts', ['merge-cells', 'span-method'])
|
|
4461
4463
|
}
|
|
4462
4464
|
const rest = removeMerges(merges, reactData.mergeList, internalData.afterFullData)
|
|
4463
4465
|
return nextTick().then(() => {
|
|
@@ -4483,7 +4485,7 @@ export default defineComponent({
|
|
|
4483
4485
|
},
|
|
4484
4486
|
setMergeFooterItems (merges) {
|
|
4485
4487
|
if (props.footerSpanMethod) {
|
|
4486
|
-
|
|
4488
|
+
errLog('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method'])
|
|
4487
4489
|
}
|
|
4488
4490
|
setMerges(merges, reactData.mergeFooterList)
|
|
4489
4491
|
return nextTick().then(() => {
|
|
@@ -4493,7 +4495,7 @@ export default defineComponent({
|
|
|
4493
4495
|
},
|
|
4494
4496
|
removeMergeFooterItems (merges) {
|
|
4495
4497
|
if (props.footerSpanMethod) {
|
|
4496
|
-
|
|
4498
|
+
errLog('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method'])
|
|
4497
4499
|
}
|
|
4498
4500
|
const rest = removeMerges(merges, reactData.mergeFooterList)
|
|
4499
4501
|
return nextTick().then(() => {
|
|
@@ -4525,6 +4527,63 @@ export default defineComponent({
|
|
|
4525
4527
|
}
|
|
4526
4528
|
return nextTick()
|
|
4527
4529
|
},
|
|
4530
|
+
getCustomStoreData () {
|
|
4531
|
+
const { id } = props
|
|
4532
|
+
const customOpts = computeCustomOpts.value
|
|
4533
|
+
const { collectColumn } = internalData
|
|
4534
|
+
const { checkMethod } = customOpts
|
|
4535
|
+
const resizableData: Record<string, number> = {}
|
|
4536
|
+
const sortData: Record<string, number> = {}
|
|
4537
|
+
const visibleData: Record<string, boolean> = {}
|
|
4538
|
+
const fixedData: Record<string, VxeColumnPropTypes.Fixed> = {}
|
|
4539
|
+
const storeData = {
|
|
4540
|
+
resizableData,
|
|
4541
|
+
sortData,
|
|
4542
|
+
visibleData,
|
|
4543
|
+
fixedData
|
|
4544
|
+
}
|
|
4545
|
+
if (!id) {
|
|
4546
|
+
errLog('vxe.error.reqProp', ['id'])
|
|
4547
|
+
return storeData
|
|
4548
|
+
}
|
|
4549
|
+
XEUtils.eachTree(collectColumn, (column, index, items, path, parent) => {
|
|
4550
|
+
// 排序只支持一级
|
|
4551
|
+
if (!parent) {
|
|
4552
|
+
collectColumn.forEach((column) => {
|
|
4553
|
+
const colKey = column.getKey()
|
|
4554
|
+
if (colKey) {
|
|
4555
|
+
sortData[colKey] = column.renderSortNumber
|
|
4556
|
+
}
|
|
4557
|
+
})
|
|
4558
|
+
}
|
|
4559
|
+
if (column.resizeWidth) {
|
|
4560
|
+
const colKey = column.getKey()
|
|
4561
|
+
if (colKey) {
|
|
4562
|
+
resizableData[colKey] = column.renderWidth
|
|
4563
|
+
}
|
|
4564
|
+
}
|
|
4565
|
+
if (column.fixed && column.fixed !== column.defaultFixed) {
|
|
4566
|
+
const colKey = column.getKey()
|
|
4567
|
+
if (colKey) {
|
|
4568
|
+
fixedData[colKey] = column.fixed
|
|
4569
|
+
}
|
|
4570
|
+
}
|
|
4571
|
+
if (!checkMethod || checkMethod({ column })) {
|
|
4572
|
+
if (!column.visible && column.defaultVisible) {
|
|
4573
|
+
const colKey = column.getKey()
|
|
4574
|
+
if (colKey) {
|
|
4575
|
+
visibleData[colKey] = false
|
|
4576
|
+
}
|
|
4577
|
+
} else if (column.visible && !column.defaultVisible) {
|
|
4578
|
+
const colKey = column.getKey()
|
|
4579
|
+
if (colKey) {
|
|
4580
|
+
visibleData[colKey] = true
|
|
4581
|
+
}
|
|
4582
|
+
}
|
|
4583
|
+
}
|
|
4584
|
+
})
|
|
4585
|
+
return storeData
|
|
4586
|
+
},
|
|
4528
4587
|
focus () {
|
|
4529
4588
|
internalData.isActivated = true
|
|
4530
4589
|
return nextTick()
|
|
@@ -4542,7 +4601,7 @@ export default defineComponent({
|
|
|
4542
4601
|
$xeToolbar = $toolbar
|
|
4543
4602
|
$xeToolbar.syncUpdate({ collectColumn: internalData.collectColumn, $table: $xeTable })
|
|
4544
4603
|
} else {
|
|
4545
|
-
|
|
4604
|
+
errLog('vxe.error.barUnableLink')
|
|
4546
4605
|
}
|
|
4547
4606
|
return nextTick()
|
|
4548
4607
|
}
|
|
@@ -5319,7 +5378,7 @@ export default defineComponent({
|
|
|
5319
5378
|
const columnWidthStorageMap = getCustomStorageMap(resizableStorageKey)
|
|
5320
5379
|
let columnWidthStorage: any
|
|
5321
5380
|
if (!id) {
|
|
5322
|
-
|
|
5381
|
+
errLog('vxe.error.reqProp', ['id'])
|
|
5323
5382
|
return
|
|
5324
5383
|
}
|
|
5325
5384
|
if (!isReset) {
|
|
@@ -5349,7 +5408,7 @@ export default defineComponent({
|
|
|
5349
5408
|
const columnSortStorageMap = getCustomStorageMap(sortStorageKey)
|
|
5350
5409
|
let columnWidthStorage: any
|
|
5351
5410
|
if (!id) {
|
|
5352
|
-
|
|
5411
|
+
errLog('vxe.error.reqProp', ['id'])
|
|
5353
5412
|
return
|
|
5354
5413
|
}
|
|
5355
5414
|
if (!isReset) {
|
|
@@ -5378,7 +5437,7 @@ export default defineComponent({
|
|
|
5378
5437
|
const columnFixedStorageMap = getCustomStorageMap(fixedStorageKey)
|
|
5379
5438
|
const colFixeds: any[] = []
|
|
5380
5439
|
if (!id) {
|
|
5381
|
-
|
|
5440
|
+
errLog('vxe.error.reqProp', ['id'])
|
|
5382
5441
|
return
|
|
5383
5442
|
}
|
|
5384
5443
|
XEUtils.eachTree(collectColumn, (column) => {
|
|
@@ -5406,7 +5465,7 @@ export default defineComponent({
|
|
|
5406
5465
|
const colHides: any[] = []
|
|
5407
5466
|
const colShows: any[] = []
|
|
5408
5467
|
if (!id) {
|
|
5409
|
-
|
|
5468
|
+
errLog('vxe.error.reqProp', ['id'])
|
|
5410
5469
|
return
|
|
5411
5470
|
}
|
|
5412
5471
|
XEUtils.eachTree(collectColumn, (column) => {
|
|
@@ -5458,7 +5517,7 @@ export default defineComponent({
|
|
|
5458
5517
|
evntList = interceptor.get('event.clearActived')
|
|
5459
5518
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
5460
5519
|
if (evntList.length) {
|
|
5461
|
-
|
|
5520
|
+
warnLog('vxe.error.delEvent', ['event.clearActived', 'event.clearEdit'])
|
|
5462
5521
|
}
|
|
5463
5522
|
}
|
|
5464
5523
|
}
|
|
@@ -6362,12 +6421,12 @@ export default defineComponent({
|
|
|
6362
6421
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
6363
6422
|
'openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',').forEach(name => {
|
|
6364
6423
|
($xeTable as any)[name] = function () {
|
|
6365
|
-
|
|
6424
|
+
errLog('vxe.error.reqModule', ['VxeTableExportModule'])
|
|
6366
6425
|
}
|
|
6367
6426
|
})
|
|
6368
6427
|
'clearValidate,fullValidate,validate'.split(',').forEach(name => {
|
|
6369
6428
|
($xeTable as any)[name] = function () {
|
|
6370
|
-
|
|
6429
|
+
errLog('vxe.error.reqModule', ['VxeTableValidatorModule'])
|
|
6371
6430
|
}
|
|
6372
6431
|
})
|
|
6373
6432
|
}
|
|
@@ -6463,10 +6522,10 @@ export default defineComponent({
|
|
|
6463
6522
|
// const checkboxOpts = computeCheckboxOpts.value
|
|
6464
6523
|
// const checkboxColumn = internalData.tableFullColumn.find(column => column.type === 'checkbox')
|
|
6465
6524
|
// if (checkboxColumn && internalData.tableFullData.length > 300 && !checkboxOpts.checkField) {
|
|
6466
|
-
//
|
|
6525
|
+
// warnLog('vxe.error.checkProp', ['checkbox-config.checkField'])
|
|
6467
6526
|
// }
|
|
6468
6527
|
if ((scrollXLoad || scrollYLoad) && expandColumn) {
|
|
6469
|
-
|
|
6528
|
+
warnLog('vxe.error.scrollErrProp', ['column.type=expand'])
|
|
6470
6529
|
}
|
|
6471
6530
|
}
|
|
6472
6531
|
tableMethods.recalculate()
|
|
@@ -6618,50 +6677,50 @@ export default defineComponent({
|
|
|
6618
6677
|
|
|
6619
6678
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
6620
6679
|
if (props.rowId) {
|
|
6621
|
-
|
|
6680
|
+
warnLog('vxe.error.delProp', ['row-id', 'row-config.keyField'])
|
|
6622
6681
|
}
|
|
6623
6682
|
if (props.rowKey) {
|
|
6624
|
-
|
|
6683
|
+
warnLog('vxe.error.delProp', ['row-key', 'row-config.useKey'])
|
|
6625
6684
|
}
|
|
6626
6685
|
if (props.columnKey) {
|
|
6627
|
-
|
|
6686
|
+
warnLog('vxe.error.delProp', ['column-id', 'column-config.useKey'])
|
|
6628
6687
|
}
|
|
6629
6688
|
if (!(props.rowId || rowOpts.keyField) && (checkboxOpts.reserve || checkboxOpts.checkRowKeys || radioOpts.reserve || radioOpts.checkRowKey || expandOpts.expandRowKeys || treeOpts.expandRowKeys)) {
|
|
6630
|
-
|
|
6689
|
+
warnLog('vxe.error.reqProp', ['row-config.keyField'])
|
|
6631
6690
|
}
|
|
6632
6691
|
if (props.editConfig && (editOpts.showStatus || editOpts.showUpdateStatus || editOpts.showInsertStatus) && !props.keepSource) {
|
|
6633
|
-
|
|
6692
|
+
warnLog('vxe.error.reqProp', ['keep-source'])
|
|
6634
6693
|
}
|
|
6635
6694
|
if (treeConfig && (treeOpts.showLine || treeOpts.line) && (!(props.rowKey || rowOpts.useKey) || !showOverflow)) {
|
|
6636
|
-
|
|
6695
|
+
warnLog('vxe.error.reqProp', ['row-config.useKey | show-overflow'])
|
|
6637
6696
|
}
|
|
6638
6697
|
if (treeConfig && props.stripe) {
|
|
6639
|
-
|
|
6698
|
+
warnLog('vxe.error.noTree', ['stripe'])
|
|
6640
6699
|
}
|
|
6641
6700
|
if (props.showFooter && !(props.footerMethod || props.footerData)) {
|
|
6642
|
-
|
|
6701
|
+
warnLog('vxe.error.reqProp', ['footer-data | footer-method'])
|
|
6643
6702
|
}
|
|
6644
6703
|
// if (props.highlightCurrentRow) {
|
|
6645
|
-
//
|
|
6704
|
+
// warnLog('vxe.error.delProp', ['highlight-current-row', 'row-config.isCurrent'])
|
|
6646
6705
|
// }
|
|
6647
6706
|
// if (props.highlightHoverRow) {
|
|
6648
|
-
//
|
|
6707
|
+
// warnLog('vxe.error.delProp', ['highlight-hover-row', 'row-config.isHover'])
|
|
6649
6708
|
// }
|
|
6650
6709
|
// if (props.highlightCurrentColumn) {
|
|
6651
|
-
//
|
|
6710
|
+
// warnLog('vxe.error.delProp', ['highlight-current-column', 'column-config.isCurrent'])
|
|
6652
6711
|
// }
|
|
6653
6712
|
// if (props.highlightHoverColumn) {
|
|
6654
|
-
//
|
|
6713
|
+
// warnLog('vxe.error.delProp', ['highlight-hover-column', 'column-config.isHover'])
|
|
6655
6714
|
// }
|
|
6656
6715
|
// 检查导入导出类型,如果自定义导入导出方法,则不校验类型
|
|
6657
6716
|
const { exportConfig, importConfig } = props
|
|
6658
6717
|
const exportOpts = computeExportOpts.value
|
|
6659
6718
|
const importOpts = computeImportOpts.value
|
|
6660
6719
|
if (importConfig && importOpts.types && !importOpts.importMethod && !XEUtils.includeArrays(XEUtils.keys(importOpts._typeMaps), importOpts.types)) {
|
|
6661
|
-
|
|
6720
|
+
warnLog('vxe.error.errProp', [`export-config.types=${importOpts.types.join(',')}`, importOpts.types.filter((type: string) => XEUtils.includes(XEUtils.keys(importOpts._typeMaps), type)).join(',') || XEUtils.keys(importOpts._typeMaps).join(',')])
|
|
6662
6721
|
}
|
|
6663
6722
|
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !XEUtils.includeArrays(XEUtils.keys(exportOpts._typeMaps), exportOpts.types)) {
|
|
6664
|
-
|
|
6723
|
+
warnLog('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter((type: string) => XEUtils.includes(XEUtils.keys(exportOpts._typeMaps), type)).join(',') || XEUtils.keys(exportOpts._typeMaps).join(',')])
|
|
6665
6724
|
}
|
|
6666
6725
|
}
|
|
6667
6726
|
|
|
@@ -6670,65 +6729,65 @@ export default defineComponent({
|
|
|
6670
6729
|
const mouseOpts = computeMouseOpts.value
|
|
6671
6730
|
const rowOpts = computeRowOpts.value
|
|
6672
6731
|
if (!props.id && props.customConfig && (customOpts.storage === true || (customOpts.storage && customOpts.storage.resizable) || (customOpts.storage && customOpts.storage.visible))) {
|
|
6673
|
-
|
|
6732
|
+
errLog('vxe.error.reqProp', ['id'])
|
|
6674
6733
|
}
|
|
6675
6734
|
if (props.treeConfig && checkboxOpts.range) {
|
|
6676
|
-
|
|
6735
|
+
errLog('vxe.error.noTree', ['checkbox-config.range'])
|
|
6677
6736
|
}
|
|
6678
6737
|
if (rowOpts.height && !props.showOverflow) {
|
|
6679
|
-
|
|
6738
|
+
warnLog('vxe.error.notProp', ['table.show-overflow'])
|
|
6680
6739
|
}
|
|
6681
6740
|
if (!$xeTable.handleUpdateCellAreas) {
|
|
6682
6741
|
if (props.clipConfig) {
|
|
6683
|
-
|
|
6742
|
+
warnLog('vxe.error.notProp', ['clip-config'])
|
|
6684
6743
|
}
|
|
6685
6744
|
if (props.fnrConfig) {
|
|
6686
|
-
|
|
6745
|
+
warnLog('vxe.error.notProp', ['fnr-config'])
|
|
6687
6746
|
}
|
|
6688
6747
|
if (mouseOpts.area) {
|
|
6689
|
-
|
|
6748
|
+
errLog('vxe.error.notProp', ['mouse-config.area'])
|
|
6690
6749
|
return
|
|
6691
6750
|
}
|
|
6692
6751
|
}
|
|
6693
6752
|
if (props.treeConfig && treeOpts.children) {
|
|
6694
|
-
|
|
6753
|
+
warnLog('vxe.error.delProp', ['tree-config.children', 'tree-config.childrenField'])
|
|
6695
6754
|
}
|
|
6696
6755
|
if (props.treeConfig && treeOpts.line) {
|
|
6697
|
-
|
|
6756
|
+
warnLog('vxe.error.delProp', ['tree-config.line', 'tree-config.showLine'])
|
|
6698
6757
|
}
|
|
6699
6758
|
if (mouseOpts.area && mouseOpts.selected) {
|
|
6700
|
-
|
|
6759
|
+
warnLog('vxe.error.errConflicts', ['mouse-config.area', 'mouse-config.selected'])
|
|
6701
6760
|
}
|
|
6702
6761
|
if (mouseOpts.area && checkboxOpts.range) {
|
|
6703
|
-
|
|
6762
|
+
warnLog('vxe.error.errConflicts', ['mouse-config.area', 'checkbox-config.range'])
|
|
6704
6763
|
}
|
|
6705
6764
|
if (props.treeConfig && mouseOpts.area) {
|
|
6706
|
-
|
|
6765
|
+
errLog('vxe.error.noTree', ['mouse-config.area'])
|
|
6707
6766
|
}
|
|
6708
6767
|
if (props.editConfig && editOpts.activeMethod) {
|
|
6709
|
-
|
|
6768
|
+
warnLog('vxe.error.delProp', ['edit-config.activeMethod', 'edit-config.beforeEditMethod'])
|
|
6710
6769
|
}
|
|
6711
6770
|
if (props.treeConfig && checkboxOpts.isShiftKey) {
|
|
6712
|
-
|
|
6771
|
+
errLog('vxe.error.errConflicts', ['tree-config', 'checkbox-config.isShiftKey'])
|
|
6713
6772
|
}
|
|
6714
6773
|
if (checkboxOpts.halfField) {
|
|
6715
|
-
|
|
6774
|
+
warnLog('vxe.error.delProp', ['checkbox-config.halfField', 'checkbox-config.indeterminateField'])
|
|
6716
6775
|
}
|
|
6717
6776
|
}
|
|
6718
6777
|
|
|
6719
6778
|
// 检查是否有安装需要的模块
|
|
6720
6779
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
6721
6780
|
if (props.editConfig && !$xeTable.insert) {
|
|
6722
|
-
|
|
6781
|
+
errLog('vxe.error.reqModule', ['Edit'])
|
|
6723
6782
|
}
|
|
6724
6783
|
if (props.editRules && !$xeTable.validate) {
|
|
6725
|
-
|
|
6784
|
+
errLog('vxe.error.reqModule', ['Validator'])
|
|
6726
6785
|
}
|
|
6727
6786
|
if ((checkboxOpts.range || props.keyboardConfig || props.mouseConfig) && !$xeTable.triggerCellMousedownEvent) {
|
|
6728
|
-
|
|
6787
|
+
errLog('vxe.error.reqModule', ['Keyboard'])
|
|
6729
6788
|
}
|
|
6730
6789
|
if ((props.printConfig || props.importConfig || props.exportConfig) && !$xeTable.exportData) {
|
|
6731
|
-
|
|
6790
|
+
errLog('vxe.error.reqModule', ['Export'])
|
|
6732
6791
|
}
|
|
6733
6792
|
}
|
|
6734
6793
|
|