vxe-table 3.13.17 → 3.13.19
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 +42 -72
- 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/validator/mixin.js +1 -3
- package/es/table/render/index.js +90 -61
- package/es/table/src/columnInfo.js +30 -32
- package/es/table/src/methods.js +141 -80
- 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 +42 -72
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +447 -411
- 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/validator/mixin.js +1 -3
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/render/index.js +98 -66
- 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 +148 -78
- 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 +42 -72
- 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/validator/mixin.ts +1 -3
- package/packages/table/render/index.ts +89 -59
- package/packages/table/src/columnInfo.ts +30 -32
- package/packages/table/src/methods.ts +143 -78
- 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.1741051533862.ttf → iconfont.1741224103306.ttf} +0 -0
- /package/es/{iconfont.1741051533862.woff → iconfont.1741224103306.woff} +0 -0
- /package/es/{iconfont.1741051533862.woff2 → iconfont.1741224103306.woff2} +0 -0
- /package/lib/{iconfont.1741051533862.ttf → iconfont.1741224103306.ttf} +0 -0
- /package/lib/{iconfont.1741051533862.woff → iconfont.1741224103306.woff} +0 -0
- /package/lib/{iconfont.1741051533862.woff2 → iconfont.1741224103306.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
|
|
@@ -580,36 +578,32 @@ export default {
|
|
|
580
578
|
// errLog('vxe.error.errConflicts', ['grid.data', 'grid.proxy-config'])
|
|
581
579
|
// }
|
|
582
580
|
|
|
583
|
-
if (
|
|
584
|
-
|
|
585
|
-
warnLog('vxe.error.delProp', ['grid.toolbar', 'grid.toolbar-config'])
|
|
586
|
-
}
|
|
587
|
-
if (this.toolbarConfig && !XEUtils.isObject(this.toolbarConfig)) {
|
|
588
|
-
warnLog('vxe.error.errProp', [`grid.toolbar-config=${this.toolbarConfig}`, 'grid.toolbar-config={}'])
|
|
589
|
-
}
|
|
590
|
-
// if (proxyOpts.props) {
|
|
591
|
-
// warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
|
|
592
|
-
// }
|
|
581
|
+
if (this.toolbar) {
|
|
582
|
+
warnLog('vxe.error.delProp', ['grid.toolbar', 'grid.toolbar-config'])
|
|
593
583
|
}
|
|
584
|
+
if (this.toolbarConfig && !XEUtils.isObject(this.toolbarConfig)) {
|
|
585
|
+
warnLog('vxe.error.errProp', [`grid.toolbar-config=${this.toolbarConfig}`, 'grid.toolbar-config={}'])
|
|
586
|
+
}
|
|
587
|
+
// if (proxyOpts.props) {
|
|
588
|
+
// warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
|
|
589
|
+
// }
|
|
594
590
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
const VxeUIPagerComponent = VxeUI.getComponent<VxePagerComponent>('VxePager')
|
|
591
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
592
|
+
const VxeUIFormComponent = VxeUI.getComponent<VxeFormComponent>('VxeForm')
|
|
593
|
+
const VxeUIPagerComponent = VxeUI.getComponent<VxePagerComponent>('VxePager')
|
|
599
594
|
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
}
|
|
595
|
+
$xeGrid.$nextTick(() => {
|
|
596
|
+
if (props.formConfig) {
|
|
597
|
+
if (!VxeUIFormComponent) {
|
|
598
|
+
errLog('vxe.error.reqComp', ['vxe-form'])
|
|
605
599
|
}
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
600
|
+
}
|
|
601
|
+
if (props.pagerConfig) {
|
|
602
|
+
if (!VxeUIPagerComponent) {
|
|
603
|
+
errLog('vxe.error.reqComp', ['vxe-pager'])
|
|
610
604
|
}
|
|
611
|
-
}
|
|
612
|
-
}
|
|
605
|
+
}
|
|
606
|
+
})
|
|
613
607
|
|
|
614
608
|
this.initPages()
|
|
615
609
|
globalEvents.on(this, 'keydown', this.handleGlobalKeydownEvent)
|
|
@@ -898,9 +892,7 @@ export default {
|
|
|
898
892
|
return { status: false }
|
|
899
893
|
})
|
|
900
894
|
} else {
|
|
901
|
-
|
|
902
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.query'])
|
|
903
|
-
}
|
|
895
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.query'])
|
|
904
896
|
}
|
|
905
897
|
break
|
|
906
898
|
}
|
|
@@ -926,10 +918,8 @@ export default {
|
|
|
926
918
|
$xetable.setPendingRow(removeRecords, false)
|
|
927
919
|
if (isRespMsg) {
|
|
928
920
|
// 检测弹窗模块
|
|
929
|
-
if (
|
|
930
|
-
|
|
931
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
932
|
-
}
|
|
921
|
+
if (!VxeUI.modal) {
|
|
922
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
933
923
|
}
|
|
934
924
|
VxeUI.modal.message({ content: this.getRespMsg(rest, 'vxe.grid.delSuccess'), status: 'success' })
|
|
935
925
|
}
|
|
@@ -947,10 +937,8 @@ export default {
|
|
|
947
937
|
this.tableLoading = false
|
|
948
938
|
if (isRespMsg) {
|
|
949
939
|
// 检测弹窗模块
|
|
950
|
-
if (
|
|
951
|
-
|
|
952
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
953
|
-
}
|
|
940
|
+
if (!VxeUI.modal) {
|
|
941
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
954
942
|
}
|
|
955
943
|
VxeUI.modal.message({ id: code, content: this.getRespMsg(rest, 'vxe.grid.operError'), status: 'error' })
|
|
956
944
|
}
|
|
@@ -963,18 +951,14 @@ export default {
|
|
|
963
951
|
} else {
|
|
964
952
|
if (isActiveMsg) {
|
|
965
953
|
// 检测弹窗模块
|
|
966
|
-
if (
|
|
967
|
-
|
|
968
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
969
|
-
}
|
|
954
|
+
if (!VxeUI.modal) {
|
|
955
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
970
956
|
}
|
|
971
957
|
VxeUI.modal.message({ id: code, content: getI18n('vxe.grid.selectOneRecord'), status: 'warning' })
|
|
972
958
|
}
|
|
973
959
|
}
|
|
974
960
|
} else {
|
|
975
|
-
|
|
976
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete'])
|
|
977
|
-
}
|
|
961
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete'])
|
|
978
962
|
}
|
|
979
963
|
break
|
|
980
964
|
}
|
|
@@ -1013,10 +997,8 @@ export default {
|
|
|
1013
997
|
$xetable.clearPendingRow()
|
|
1014
998
|
if (isRespMsg) {
|
|
1015
999
|
// 检测弹窗模块
|
|
1016
|
-
if (
|
|
1017
|
-
|
|
1018
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
1019
|
-
}
|
|
1000
|
+
if (!VxeUI.modal) {
|
|
1001
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
1020
1002
|
}
|
|
1021
1003
|
VxeUI.modal.message({ content: this.getRespMsg(rest, 'vxe.grid.saveSuccess'), status: 'success' })
|
|
1022
1004
|
}
|
|
@@ -1034,10 +1016,8 @@ export default {
|
|
|
1034
1016
|
this.tableLoading = false
|
|
1035
1017
|
if (isRespMsg) {
|
|
1036
1018
|
// 检测弹窗模块
|
|
1037
|
-
if (
|
|
1038
|
-
|
|
1039
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
1040
|
-
}
|
|
1019
|
+
if (!VxeUI.modal) {
|
|
1020
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
1041
1021
|
}
|
|
1042
1022
|
VxeUI.modal.message({ id: code, content: this.getRespMsg(rest, 'vxe.grid.operError'), status: 'error' })
|
|
1043
1023
|
}
|
|
@@ -1049,19 +1029,15 @@ export default {
|
|
|
1049
1029
|
} else {
|
|
1050
1030
|
if (isActiveMsg) {
|
|
1051
1031
|
// 检测弹窗模块
|
|
1052
|
-
if (
|
|
1053
|
-
|
|
1054
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
1055
|
-
}
|
|
1032
|
+
if (!VxeUI.modal) {
|
|
1033
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
1056
1034
|
}
|
|
1057
1035
|
VxeUI.modal.message({ id: code, content: getI18n('vxe.grid.dataUnchanged'), status: 'info' })
|
|
1058
1036
|
}
|
|
1059
1037
|
}
|
|
1060
1038
|
})
|
|
1061
1039
|
} else {
|
|
1062
|
-
|
|
1063
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.save'])
|
|
1064
|
-
}
|
|
1040
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.save'])
|
|
1065
1041
|
}
|
|
1066
1042
|
break
|
|
1067
1043
|
}
|
|
@@ -1071,9 +1047,7 @@ export default {
|
|
|
1071
1047
|
if (gCommandOpts.commandMethod) {
|
|
1072
1048
|
gCommandOpts.commandMethod({ code, button, $grid: this, $table: $xetable }, ...args)
|
|
1073
1049
|
} else {
|
|
1074
|
-
|
|
1075
|
-
errLog('vxe.error.notCommands', [code])
|
|
1076
|
-
}
|
|
1050
|
+
errLog('vxe.error.notCommands', [code])
|
|
1077
1051
|
}
|
|
1078
1052
|
}
|
|
1079
1053
|
}
|
|
@@ -1100,10 +1074,8 @@ export default {
|
|
|
1100
1074
|
})
|
|
1101
1075
|
} else {
|
|
1102
1076
|
// 检测弹窗模块
|
|
1103
|
-
if (
|
|
1104
|
-
|
|
1105
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
1106
|
-
}
|
|
1077
|
+
if (!VxeUI.modal) {
|
|
1078
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
1107
1079
|
}
|
|
1108
1080
|
VxeUI.modal.message({ id: `msg_${code}`, content: getI18n('vxe.grid.selectOneRecord'), status: 'warning' })
|
|
1109
1081
|
}
|
|
@@ -1151,10 +1123,8 @@ export default {
|
|
|
1151
1123
|
} else {
|
|
1152
1124
|
if (isActiveMsg) {
|
|
1153
1125
|
// 检测弹窗模块
|
|
1154
|
-
if (
|
|
1155
|
-
|
|
1156
|
-
errLog('vxe.error.reqModule', ['Modal'])
|
|
1157
|
-
}
|
|
1126
|
+
if (!VxeUI.modal) {
|
|
1127
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
1158
1128
|
}
|
|
1159
1129
|
VxeUI.modal.message({ id: code, content: getI18n('vxe.grid.selectOneRecord'), status: 'warning' })
|
|
1160
1130
|
}
|
|
@@ -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
|
|
@@ -162,11 +162,9 @@ function handleInsertRowAt ($xeTable: any, records: any[], targetRow: any, isIns
|
|
|
162
162
|
const parentLevel = parentRest ? parentRest.level : 0
|
|
163
163
|
newRecords.forEach((item: any, i: any) => {
|
|
164
164
|
const rowid = getRowid($xeTable, item)
|
|
165
|
-
if (
|
|
166
|
-
if (item[treeOpts.parentField]) {
|
|
167
|
-
|
|
168
|
-
errLog('vxe.error.errProp', [`${treeOpts.parentField}=${item[treeOpts.parentField]}`, `${treeOpts.parentField}=${parentRow[rowField]}`])
|
|
169
|
-
}
|
|
165
|
+
if (item[treeOpts.parentField]) {
|
|
166
|
+
if (parentRow && item[treeOpts.parentField] !== parentRow[rowField]) {
|
|
167
|
+
errLog('vxe.error.errProp', [`${treeOpts.parentField}=${item[treeOpts.parentField]}`, `${treeOpts.parentField}=${parentRow[rowField]}`])
|
|
170
168
|
}
|
|
171
169
|
}
|
|
172
170
|
if (parentRow) {
|
|
@@ -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)
|