vxe-table 3.14.0-beta.1 → 3.14.0-beta.2
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 +34 -62
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +25 -27
- 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/validator/mixin.js +1 -3
- package/es/table/render/index.js +2 -4
- package/es/table/src/columnInfo.js +30 -32
- package/es/table/src/methods.js +121 -94
- 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 +34 -62
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +323 -340
- 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/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/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/columnInfo.js +32 -34
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +129 -91
- 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 +34 -62
- package/packages/table/module/custom/panel.ts +25 -27
- 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/validator/mixin.ts +1 -3
- package/packages/table/render/index.ts +2 -4
- package/packages/table/src/columnInfo.ts +30 -32
- package/packages/table/src/methods.ts +126 -95
- 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.1741051885975.ttf → iconfont.1741079977180.ttf} +0 -0
- /package/es/{iconfont.1741051885975.woff → iconfont.1741079977180.woff} +0 -0
- /package/es/{iconfont.1741051885975.woff2 → iconfont.1741079977180.woff2} +0 -0
- /package/lib/{iconfont.1741051885975.ttf → iconfont.1741079977180.ttf} +0 -0
- /package/lib/{iconfont.1741051885975.woff → iconfont.1741079977180.woff} +0 -0
- /package/lib/{iconfont.1741051885975.woff2 → iconfont.1741079977180.woff2} +0 -0
|
@@ -76,9 +76,7 @@ function getFuncSlot ($xeGrid: any, optSlots: any, slotKey: any) {
|
|
|
76
76
|
if (slots[funcSlot]) {
|
|
77
77
|
return slots[funcSlot]
|
|
78
78
|
} else {
|
|
79
|
-
|
|
80
|
-
errLog('vxe.error.notSlot', [funcSlot])
|
|
81
|
-
}
|
|
79
|
+
errLog('vxe.error.notSlot', [funcSlot])
|
|
82
80
|
}
|
|
83
81
|
} else {
|
|
84
82
|
return funcSlot
|
|
@@ -594,24 +592,22 @@ export default {
|
|
|
594
592
|
// }
|
|
595
593
|
}
|
|
596
594
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
const VxeUIPagerComponent = VxeUI.getComponent<VxePagerComponent>('VxePager')
|
|
595
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
596
|
+
const VxeUIFormComponent = VxeUI.getComponent<VxeFormComponent>('VxeForm')
|
|
597
|
+
const VxeUIPagerComponent = VxeUI.getComponent<VxePagerComponent>('VxePager')
|
|
601
598
|
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
}
|
|
599
|
+
$xeGrid.$nextTick(() => {
|
|
600
|
+
if (props.formConfig) {
|
|
601
|
+
if (!VxeUIFormComponent) {
|
|
602
|
+
errLog('vxe.error.reqComp', ['vxe-form'])
|
|
607
603
|
}
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
604
|
+
}
|
|
605
|
+
if (props.pagerConfig) {
|
|
606
|
+
if (!VxeUIPagerComponent) {
|
|
607
|
+
errLog('vxe.error.reqComp', ['vxe-pager'])
|
|
612
608
|
}
|
|
613
|
-
}
|
|
614
|
-
}
|
|
609
|
+
}
|
|
610
|
+
})
|
|
615
611
|
|
|
616
612
|
this.initPages()
|
|
617
613
|
globalEvents.on(this, 'keydown', this.handleGlobalKeydownEvent)
|
|
@@ -908,9 +904,7 @@ export default {
|
|
|
908
904
|
return { status: false }
|
|
909
905
|
})
|
|
910
906
|
} else {
|
|
911
|
-
|
|
912
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.query'])
|
|
913
|
-
}
|
|
907
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.query'])
|
|
914
908
|
}
|
|
915
909
|
break
|
|
916
910
|
}
|
|
@@ -936,10 +930,8 @@ export default {
|
|
|
936
930
|
$xeTable.setPendingRow(removeRecords, false)
|
|
937
931
|
if (isRespMsg) {
|
|
938
932
|
// 检测弹窗模块
|
|
939
|
-
if (
|
|
940
|
-
|
|
941
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
942
|
-
}
|
|
933
|
+
if (!VxeUI.modal) {
|
|
934
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
943
935
|
}
|
|
944
936
|
VxeUI.modal.message({ content: this.getRespMsg(rest, 'vxe.grid.delSuccess'), status: 'success' })
|
|
945
937
|
}
|
|
@@ -957,10 +949,8 @@ export default {
|
|
|
957
949
|
this.tableLoading = false
|
|
958
950
|
if (isRespMsg) {
|
|
959
951
|
// 检测弹窗模块
|
|
960
|
-
if (
|
|
961
|
-
|
|
962
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
963
|
-
}
|
|
952
|
+
if (!VxeUI.modal) {
|
|
953
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
964
954
|
}
|
|
965
955
|
VxeUI.modal.message({ id: code, content: this.getRespMsg(rest, 'vxe.grid.operError'), status: 'error' })
|
|
966
956
|
}
|
|
@@ -973,18 +963,14 @@ export default {
|
|
|
973
963
|
} else {
|
|
974
964
|
if (isActiveMsg) {
|
|
975
965
|
// 检测弹窗模块
|
|
976
|
-
if (
|
|
977
|
-
|
|
978
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
979
|
-
}
|
|
966
|
+
if (!VxeUI.modal) {
|
|
967
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
980
968
|
}
|
|
981
969
|
VxeUI.modal.message({ id: code, content: getI18n('vxe.grid.selectOneRecord'), status: 'warning' })
|
|
982
970
|
}
|
|
983
971
|
}
|
|
984
972
|
} else {
|
|
985
|
-
|
|
986
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete'])
|
|
987
|
-
}
|
|
973
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete'])
|
|
988
974
|
}
|
|
989
975
|
break
|
|
990
976
|
}
|
|
@@ -1023,10 +1009,8 @@ export default {
|
|
|
1023
1009
|
$xeTable.clearPendingRow()
|
|
1024
1010
|
if (isRespMsg) {
|
|
1025
1011
|
// 检测弹窗模块
|
|
1026
|
-
if (
|
|
1027
|
-
|
|
1028
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
1029
|
-
}
|
|
1012
|
+
if (!VxeUI.modal) {
|
|
1013
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
1030
1014
|
}
|
|
1031
1015
|
VxeUI.modal.message({ content: this.getRespMsg(rest, 'vxe.grid.saveSuccess'), status: 'success' })
|
|
1032
1016
|
}
|
|
@@ -1044,10 +1028,8 @@ export default {
|
|
|
1044
1028
|
this.tableLoading = false
|
|
1045
1029
|
if (isRespMsg) {
|
|
1046
1030
|
// 检测弹窗模块
|
|
1047
|
-
if (
|
|
1048
|
-
|
|
1049
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
1050
|
-
}
|
|
1031
|
+
if (!VxeUI.modal) {
|
|
1032
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
1051
1033
|
}
|
|
1052
1034
|
VxeUI.modal.message({ id: code, content: this.getRespMsg(rest, 'vxe.grid.operError'), status: 'error' })
|
|
1053
1035
|
}
|
|
@@ -1059,19 +1041,15 @@ export default {
|
|
|
1059
1041
|
} else {
|
|
1060
1042
|
if (isActiveMsg) {
|
|
1061
1043
|
// 检测弹窗模块
|
|
1062
|
-
if (
|
|
1063
|
-
|
|
1064
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
1065
|
-
}
|
|
1044
|
+
if (!VxeUI.modal) {
|
|
1045
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
1066
1046
|
}
|
|
1067
1047
|
VxeUI.modal.message({ id: code, content: getI18n('vxe.grid.dataUnchanged'), status: 'info' })
|
|
1068
1048
|
}
|
|
1069
1049
|
}
|
|
1070
1050
|
})
|
|
1071
1051
|
} else {
|
|
1072
|
-
|
|
1073
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.save'])
|
|
1074
|
-
}
|
|
1052
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.save'])
|
|
1075
1053
|
}
|
|
1076
1054
|
break
|
|
1077
1055
|
}
|
|
@@ -1081,9 +1059,7 @@ export default {
|
|
|
1081
1059
|
if (gCommandOpts.commandMethod) {
|
|
1082
1060
|
gCommandOpts.commandMethod({ code, button, $grid: this, $table: $xeTable }, ...args)
|
|
1083
1061
|
} else {
|
|
1084
|
-
|
|
1085
|
-
errLog('vxe.error.notCommands', [code])
|
|
1086
|
-
}
|
|
1062
|
+
errLog('vxe.error.notCommands', [code])
|
|
1087
1063
|
}
|
|
1088
1064
|
}
|
|
1089
1065
|
}
|
|
@@ -1110,10 +1086,8 @@ export default {
|
|
|
1110
1086
|
})
|
|
1111
1087
|
} else {
|
|
1112
1088
|
// 检测弹窗模块
|
|
1113
|
-
if (
|
|
1114
|
-
|
|
1115
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
1116
|
-
}
|
|
1089
|
+
if (!VxeUI.modal) {
|
|
1090
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
1117
1091
|
}
|
|
1118
1092
|
VxeUI.modal.message({ id: `msg_${code}`, content: getI18n('vxe.grid.selectOneRecord'), status: 'warning' })
|
|
1119
1093
|
}
|
|
@@ -1161,10 +1135,8 @@ export default {
|
|
|
1161
1135
|
} else {
|
|
1162
1136
|
if (isActiveMsg) {
|
|
1163
1137
|
// 检测弹窗模块
|
|
1164
|
-
if (
|
|
1165
|
-
|
|
1166
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
1167
|
-
}
|
|
1138
|
+
if (!VxeUI.modal) {
|
|
1139
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
1168
1140
|
}
|
|
1169
1141
|
VxeUI.modal.message({ id: code, content: getI18n('vxe.grid.selectOneRecord'), status: 'warning' })
|
|
1170
1142
|
}
|
|
@@ -844,34 +844,32 @@ export default {
|
|
|
844
844
|
computed: {
|
|
845
845
|
},
|
|
846
846
|
created (this: any) {
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
const VxeUIRadioGroupComponent = VxeUI.getComponent<VxeRadioGroupComponent>('VxeRadioGroup')
|
|
847
|
+
const VxeUIModalComponent = VxeUI.getComponent<VxeModalComponent>('VxeModal')
|
|
848
|
+
const VxeUIDrawerComponent = VxeUI.getComponent<VxeDrawerComponent>('VxeDrawer')
|
|
849
|
+
const VxeUIButtonComponent = VxeUI.getComponent<VxeButtonComponent>('VxeButton')
|
|
850
|
+
const VxeUINumberInputComponent = VxeUI.getComponent<VxeInputComponent>('VxeNumberInput')
|
|
851
|
+
const VxeUIRadioGroupComponent = VxeUI.getComponent<VxeRadioGroupComponent>('VxeRadioGroup')
|
|
853
852
|
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
}
|
|
853
|
+
this.$nextTick(() => {
|
|
854
|
+
const { $xetable } = this
|
|
855
|
+
const { customOpts } = $xetable
|
|
856
|
+
const { mode } = customOpts
|
|
857
|
+
if (!VxeUIModalComponent) {
|
|
858
|
+
errLog('vxe.error.reqComp', ['vxe-modal'])
|
|
859
|
+
}
|
|
860
|
+
if (!VxeUIDrawerComponent && (mode === 'drawer')) {
|
|
861
|
+
errLog('vxe.error.reqComp', ['vxe-drawer'])
|
|
862
|
+
}
|
|
863
|
+
if (!VxeUIButtonComponent) {
|
|
864
|
+
errLog('vxe.error.reqComp', ['vxe-button'])
|
|
865
|
+
}
|
|
866
|
+
if (!VxeUINumberInputComponent) {
|
|
867
|
+
errLog('vxe.error.reqComp', ['vxe-input'])
|
|
868
|
+
}
|
|
869
|
+
if (!VxeUIRadioGroupComponent) {
|
|
870
|
+
errLog('vxe.error.reqComp', ['vxe-radio-group'])
|
|
871
|
+
}
|
|
872
|
+
})
|
|
875
873
|
},
|
|
876
874
|
render (this: any, h: CreateElement) {
|
|
877
875
|
const $xeTable = this.$xeTable
|
|
@@ -59,31 +59,29 @@ export default {
|
|
|
59
59
|
created (this: any) {
|
|
60
60
|
const $xeTableExportPanel = this
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const VxeUICheckboxComponent = VxeUI.getComponent<VxeCheckboxComponent>('VxeCheckbox')
|
|
62
|
+
const VxeUIModalComponent = VxeUI.getComponent<VxeModalComponent>('VxeModal')
|
|
63
|
+
const VxeUIButtonComponent = VxeUI.getComponent<VxeButtonComponent>('VxeButton')
|
|
64
|
+
const VxeUISelectComponent = VxeUI.getComponent<VxeSelectComponent>('VxeSelect')
|
|
65
|
+
const VxeUIInputComponent = VxeUI.getComponent<VxeInputComponent>('VxeInput')
|
|
66
|
+
const VxeUICheckboxComponent = VxeUI.getComponent<VxeCheckboxComponent>('VxeCheckbox')
|
|
68
67
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
68
|
+
$xeTableExportPanel.$nextTick(() => {
|
|
69
|
+
if (!VxeUIModalComponent) {
|
|
70
|
+
errLog('vxe.error.reqComp', ['vxe-modal'])
|
|
71
|
+
}
|
|
72
|
+
if (!VxeUIButtonComponent) {
|
|
73
|
+
errLog('vxe.error.reqComp', ['vxe-button'])
|
|
74
|
+
}
|
|
75
|
+
if (!VxeUISelectComponent) {
|
|
76
|
+
errLog('vxe.error.reqComp', ['vxe-select'])
|
|
77
|
+
}
|
|
78
|
+
if (!VxeUIInputComponent) {
|
|
79
|
+
errLog('vxe.error.reqComp', ['vxe-input'])
|
|
80
|
+
}
|
|
81
|
+
if (!VxeUICheckboxComponent) {
|
|
82
|
+
errLog('vxe.error.reqComp', ['vxe-checkbox'])
|
|
83
|
+
}
|
|
84
|
+
})
|
|
87
85
|
},
|
|
88
86
|
render (this: any, h: CreateElement) {
|
|
89
87
|
const $xeTable = this.$xeTable
|
|
@@ -51,23 +51,21 @@ export default {
|
|
|
51
51
|
created (this: any) {
|
|
52
52
|
const $xeTableImportPanel = this
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const VxeUISelectComponent = VxeUI.getComponent<VxeSelectComponent>('VxeSelect')
|
|
54
|
+
const VxeUIModalComponent = VxeUI.getComponent<VxeModalComponent>('VxeModal')
|
|
55
|
+
const VxeUIButtonComponent = VxeUI.getComponent<VxeButtonComponent>('VxeButton')
|
|
56
|
+
const VxeUISelectComponent = VxeUI.getComponent<VxeSelectComponent>('VxeSelect')
|
|
58
57
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
58
|
+
$xeTableImportPanel.$nextTick(() => {
|
|
59
|
+
if (!VxeUIModalComponent) {
|
|
60
|
+
errLog('vxe.error.reqComp', ['vxe-modal'])
|
|
61
|
+
}
|
|
62
|
+
if (!VxeUIButtonComponent) {
|
|
63
|
+
errLog('vxe.error.reqComp', ['vxe-button'])
|
|
64
|
+
}
|
|
65
|
+
if (!VxeUISelectComponent) {
|
|
66
|
+
errLog('vxe.error.reqComp', ['vxe-select'])
|
|
67
|
+
}
|
|
68
|
+
})
|
|
71
69
|
},
|
|
72
70
|
render (this: any, h: CreateElement) {
|
|
73
71
|
const $xeTable = this.$xeTable
|
|
@@ -599,10 +599,8 @@ function downloadFile ($xetable: any, opts: any, content: any) {
|
|
|
599
599
|
saveLocalFile({ filename, type, content }).then(() => {
|
|
600
600
|
if (opts.message !== false) {
|
|
601
601
|
// 检测弹窗模块
|
|
602
|
-
if (
|
|
603
|
-
|
|
604
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
605
|
-
}
|
|
602
|
+
if (!VxeUI.modal) {
|
|
603
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
606
604
|
}
|
|
607
605
|
VxeUI.modal.message({ content: getI18n('vxe.table.expSuccess'), status: 'success' })
|
|
608
606
|
}
|
|
@@ -865,10 +863,8 @@ function handleImport ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, c
|
|
|
865
863
|
}
|
|
866
864
|
if (opts.message !== false) {
|
|
867
865
|
// 检测弹窗模块
|
|
868
|
-
if (
|
|
869
|
-
|
|
870
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
871
|
-
}
|
|
866
|
+
if (!VxeUI.modal) {
|
|
867
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
872
868
|
}
|
|
873
869
|
VxeUI.modal.message({ content: getI18n('vxe.table.impSuccess', [rows.length]), status: 'success' })
|
|
874
870
|
}
|
|
@@ -880,10 +876,8 @@ function handleImport ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, c
|
|
|
880
876
|
})
|
|
881
877
|
} else if (opts.message !== false) {
|
|
882
878
|
// 检测弹窗模块
|
|
883
|
-
if (
|
|
884
|
-
|
|
885
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
886
|
-
}
|
|
879
|
+
if (!VxeUI.modal) {
|
|
880
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
887
881
|
}
|
|
888
882
|
VxeUI.modal.message({ content: getI18n('vxe.error.impFields'), status: 'error' })
|
|
889
883
|
if (_importReject) {
|
|
@@ -901,10 +895,8 @@ function handleFileImport ($xetable: any, file: any, opts: any) {
|
|
|
901
895
|
if (!importMethod && !XEUtils.includes(XEUtils.keys(importOpts._typeMaps), type)) {
|
|
902
896
|
if (opts.message !== false) {
|
|
903
897
|
// 检测弹窗模块
|
|
904
|
-
if (
|
|
905
|
-
|
|
906
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
907
|
-
}
|
|
898
|
+
if (!VxeUI.modal) {
|
|
899
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
908
900
|
}
|
|
909
901
|
VxeUI.modal.message({ content: getI18n('vxe.error.notType', [type]), status: 'error' })
|
|
910
902
|
}
|
|
@@ -952,9 +944,7 @@ function handleFileImport ($xetable: any, file: any, opts: any) {
|
|
|
952
944
|
}
|
|
953
945
|
} else {
|
|
954
946
|
// 不支持的浏览器
|
|
955
|
-
|
|
956
|
-
errLog('vxe.error.notExp')
|
|
957
|
-
}
|
|
947
|
+
errLog('vxe.error.notExp')
|
|
958
948
|
_importResolve({ status: true })
|
|
959
949
|
}
|
|
960
950
|
})
|
|
@@ -1016,10 +1006,8 @@ export function readLocalFile (options: any = {}) {
|
|
|
1016
1006
|
} else {
|
|
1017
1007
|
if (options.message !== false) {
|
|
1018
1008
|
// 检测弹窗模块
|
|
1019
|
-
if (
|
|
1020
|
-
|
|
1021
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
1022
|
-
}
|
|
1009
|
+
if (!VxeUI.modal) {
|
|
1010
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
1023
1011
|
}
|
|
1024
1012
|
VxeUI.modal.message({ content: getI18n('vxe.error.notType', [errType]), status: 'error' })
|
|
1025
1013
|
}
|
|
@@ -1688,20 +1676,16 @@ export default {
|
|
|
1688
1676
|
_closeExport: handleCloseExport,
|
|
1689
1677
|
_openExport (options: any) {
|
|
1690
1678
|
const { exportOpts } = this
|
|
1691
|
-
if (
|
|
1692
|
-
|
|
1693
|
-
errLog('vxe.error.reqProp', ['export-config'])
|
|
1694
|
-
}
|
|
1679
|
+
if (!this.exportConfig) {
|
|
1680
|
+
errLog('vxe.error.reqProp', ['export-config'])
|
|
1695
1681
|
}
|
|
1696
1682
|
return handleExportAndPrint(this, Object.assign({}, exportOpts, options))
|
|
1697
1683
|
},
|
|
1698
1684
|
_closePrint: handleCloseExport,
|
|
1699
1685
|
_openPrint (options: any) {
|
|
1700
1686
|
const { printOpts } = this
|
|
1701
|
-
if (
|
|
1702
|
-
|
|
1703
|
-
errLog('vxe.error.reqProp', ['print-config'])
|
|
1704
|
-
}
|
|
1687
|
+
if (!this.printConfig) {
|
|
1688
|
+
errLog('vxe.error.reqProp', ['print-config'])
|
|
1705
1689
|
}
|
|
1706
1690
|
return handleExportAndPrint(this, Object.assign({}, printOpts, options), true)
|
|
1707
1691
|
}
|
|
@@ -356,9 +356,7 @@ export default {
|
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
} else {
|
|
359
|
-
|
|
360
|
-
errLog('vxe.error.notValidators', [validator])
|
|
361
|
-
}
|
|
359
|
+
errLog('vxe.error.notValidators', [validator])
|
|
362
360
|
}
|
|
363
361
|
} else {
|
|
364
362
|
customValid = validator(validParams)
|
|
@@ -184,10 +184,8 @@ function getComponentOns (renderOpts: any, params: any, eFns?: {
|
|
|
184
184
|
const ons: any = {}
|
|
185
185
|
XEUtils.objectEach(events, (func, key: any) => {
|
|
186
186
|
ons[getOnName(key)] = function (...args: any[]) {
|
|
187
|
-
if (
|
|
188
|
-
|
|
189
|
-
errLog('vxe.error.errFunc', [func])
|
|
190
|
-
}
|
|
187
|
+
if (!XEUtils.isFunction(func)) {
|
|
188
|
+
errLog('vxe.error.errFunc', [func])
|
|
191
189
|
}
|
|
192
190
|
func(params, ...args)
|
|
193
191
|
}
|
|
@@ -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
|
}
|