tianheng-ui 0.1.81 → 0.1.84
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/README.md +72 -15
- package/lib/theme-chalk/fonts/formMaking-iconfont.svg +155 -155
- package/lib/theme-chalk/fonts/th-iconfont.css +2402 -2402
- package/lib/theme-chalk/js/axios.js +87 -87
- package/lib/tianheng-ui.js +13 -13
- package/package.json +87 -86
- package/packages/CodeEditor/index.vue +3 -2
- package/packages/FormMaking/GenerateForm.vue +392 -392
- package/packages/FormMaking/Upload/index.vue +571 -571
- package/packages/FormMaking/WidgetFooter.vue +16 -0
- package/packages/FormMaking/WidgetForm.vue +145 -146
- package/packages/FormMaking/WidgetTools.vue +21 -16
- package/packages/FormMaking/custom/config.js +120 -2
- package/packages/FormMaking/custom/configs/number.vue +0 -5
- package/packages/FormMaking/custom/configs/page-table.vue +146 -0
- package/packages/FormMaking/custom/index.js +1 -1
- package/packages/FormMaking/custom/items/page-table.vue +250 -0
- package/packages/FormMaking/custom/register.js +43 -43
- package/packages/FormMaking/iconfont/demo.css +539 -539
- package/packages/FormMaking/iconfont/demo_index.html +1159 -1159
- package/packages/FormMaking/iconfont/formMaking-iconfont.css +189 -189
- package/packages/FormMaking/iconfont/formMaking-iconfont.svg +155 -155
- package/packages/FormMaking/index.js +33 -33
- package/packages/FormMaking/index.vue +6 -1
- package/packages/FormMaking/lang/en-US.js +187 -187
- package/packages/FormMaking/lang/zh-CN.js +187 -187
- package/packages/FormMaking/network/axios.js +88 -88
- package/packages/FormMaking/styles/index.scss +216 -216
- package/packages/FormMaking/util/generateCode.js +427 -157
- package/packages/FormMaking/util/index.js +98 -98
- package/packages/TableMaking/network/axios.js +88 -88
- package/packages/TableMaking/widgetConfig.vue +1 -1
@@ -1,187 +1,187 @@
|
|
1
|
-
export default {
|
2
|
-
fm: {
|
3
|
-
components: {
|
4
|
-
fields: {
|
5
|
-
input: '单行文本',
|
6
|
-
textarea: '多行文本',
|
7
|
-
number: '计数器',
|
8
|
-
radio: '单选框组',
|
9
|
-
checkbox: '多选框组',
|
10
|
-
time: '时间选择器',
|
11
|
-
date: '日期选择器',
|
12
|
-
rate: '评分',
|
13
|
-
color: '颜色选择器',
|
14
|
-
select: '下拉选择器',
|
15
|
-
switch: '开关',
|
16
|
-
slider: '滑块',
|
17
|
-
text: '文字',
|
18
|
-
blank: '自定义区域',
|
19
|
-
fileupload: '文件',
|
20
|
-
upload: '图片',
|
21
|
-
editor: '编辑器',
|
22
|
-
cascader: '级联选择器',
|
23
|
-
table: '子表格',
|
24
|
-
grid: '栅格布局',
|
25
|
-
tabs: '标签页',
|
26
|
-
divider: '分割线'
|
27
|
-
},
|
28
|
-
basic: {
|
29
|
-
title: '基础字段',
|
30
|
-
},
|
31
|
-
advance: {
|
32
|
-
title: '高级字段',
|
33
|
-
},
|
34
|
-
layout: {
|
35
|
-
title: '布局字段',
|
36
|
-
}
|
37
|
-
},
|
38
|
-
description: {
|
39
|
-
containerEmpty: '从左侧拖拽来添加字段',
|
40
|
-
configEmpty: '请添加字段',
|
41
|
-
tableEmpty: '从左侧拖拽来添加字段',
|
42
|
-
uploadJsonInfo: 'JSON格式如下,直接复制生成的json覆盖此处代码点击确定即可'
|
43
|
-
},
|
44
|
-
message: {
|
45
|
-
copySuccess: '复制成功',
|
46
|
-
validError: '表单数据校验失败'
|
47
|
-
},
|
48
|
-
actions: {
|
49
|
-
import: '导入JSON',
|
50
|
-
clear: '清空',
|
51
|
-
preview: '预览',
|
52
|
-
json: '生成JSON',
|
53
|
-
code: '生成代码',
|
54
|
-
getData: '获取数据',
|
55
|
-
reset: '重置',
|
56
|
-
copyData: '复制数据',
|
57
|
-
cancel: '取 消',
|
58
|
-
confirm: '确 定',
|
59
|
-
addOption: '添加选项',
|
60
|
-
addColumn: '添加列',
|
61
|
-
addTab: '添加标签',
|
62
|
-
upload: '点击上传',
|
63
|
-
add: '添加'
|
64
|
-
},
|
65
|
-
config: {
|
66
|
-
form: {
|
67
|
-
title: '表单属性',
|
68
|
-
labelPosition: {
|
69
|
-
title: '标签对齐方式',
|
70
|
-
left: '左对齐',
|
71
|
-
right: '右对齐',
|
72
|
-
top: '顶部对齐'
|
73
|
-
},
|
74
|
-
labelWidth: '表单标签宽度',
|
75
|
-
size: '组件尺寸',
|
76
|
-
customClass: '自定义Class'
|
77
|
-
},
|
78
|
-
widget: {
|
79
|
-
title: '字段属性',
|
80
|
-
model: '字段标识',
|
81
|
-
name: '标题',
|
82
|
-
width: '宽度',
|
83
|
-
height: '高度',
|
84
|
-
size: '大小',
|
85
|
-
labelWidth: '标签宽度',
|
86
|
-
custom: '自定义',
|
87
|
-
placeholder: '占位内容',
|
88
|
-
layout: '布局方式',
|
89
|
-
block: '块级',
|
90
|
-
inline: '行内',
|
91
|
-
contentPosition: '文案位置',
|
92
|
-
left: '左侧',
|
93
|
-
right: '右侧',
|
94
|
-
center: '居中',
|
95
|
-
showInput: '显示输入框',
|
96
|
-
min: '最小值',
|
97
|
-
max: '最大值',
|
98
|
-
step: '步长',
|
99
|
-
multiple: '是否多选',
|
100
|
-
filterable: '是否可搜索',
|
101
|
-
allowHalf: '允许半选',
|
102
|
-
showAlpha: '支持透明度选择',
|
103
|
-
showLabel: '是否显示标签',
|
104
|
-
option: '选项',
|
105
|
-
staticData: '静态数据',
|
106
|
-
remoteData: '远端数据',
|
107
|
-
remoteFunc: '远端方法',
|
108
|
-
value: '值',
|
109
|
-
label: '标签',
|
110
|
-
childrenOption: '子选项',
|
111
|
-
defaultValue: '默认值',
|
112
|
-
showType: '显示类型',
|
113
|
-
isRange: '是否为范围选择',
|
114
|
-
isTimestamp: '是否获取时间戳',
|
115
|
-
startPlaceholder: '开始时间占位内容',
|
116
|
-
endPlaceholder: '结束时间占位内容',
|
117
|
-
format: '格式',
|
118
|
-
limit: '最大上传数',
|
119
|
-
isQiniu: '使用七牛上传',
|
120
|
-
tokenFunc: '获取七牛Token方法',
|
121
|
-
imageAction: '图片上传地址',
|
122
|
-
tip: '提示说明文字',
|
123
|
-
action: '上传地址',
|
124
|
-
defaultType: '绑定数据类型',
|
125
|
-
string: '字符串',
|
126
|
-
object: '对象',
|
127
|
-
array: '数组',
|
128
|
-
number: '数字',
|
129
|
-
boolean: '布尔值',
|
130
|
-
integer: '整数',
|
131
|
-
float: '浮点数',
|
132
|
-
url: 'URL地址',
|
133
|
-
email: '邮箱地址',
|
134
|
-
hex: '十六进制',
|
135
|
-
gutter: '栅格间隔',
|
136
|
-
columnOption: '列配置项',
|
137
|
-
span: '栅格值',
|
138
|
-
justify: '水平排列方式',
|
139
|
-
justifyStart: '左对齐',
|
140
|
-
justifyEnd: '右对齐',
|
141
|
-
justifyCenter: '居中',
|
142
|
-
justifySpaceAround: '两侧间隔相等',
|
143
|
-
justifySpaceBetween: '两端对齐',
|
144
|
-
align: '垂直排列方式',
|
145
|
-
alignTop: '顶部对齐',
|
146
|
-
alignMiddle: '居中',
|
147
|
-
alignBottom: '底部对齐',
|
148
|
-
type: '风格类型',
|
149
|
-
default: '默认',
|
150
|
-
card: '选项卡',
|
151
|
-
borderCard: '卡片化',
|
152
|
-
tabPosition: '选项卡位置',
|
153
|
-
top: '顶部',
|
154
|
-
bottom: '底部',
|
155
|
-
tabOption: '标签配置项',
|
156
|
-
tabName: '标签名称',
|
157
|
-
customClass: '自定义Class',
|
158
|
-
attribute: '操作属性',
|
159
|
-
dataBind: '数据绑定',
|
160
|
-
hidden: '隐藏',
|
161
|
-
readonly: '完全只读',
|
162
|
-
disabled: '禁用',
|
163
|
-
editable: '文本框可输入',
|
164
|
-
clearable: '显示清除按钮',
|
165
|
-
arrowControl: '使用箭头进行时间选择',
|
166
|
-
isDelete: '删除',
|
167
|
-
isEdit: '编辑',
|
168
|
-
showPassword: '显示密码',
|
169
|
-
validate: '校验',
|
170
|
-
required: '必填',
|
171
|
-
patternPlaceholder: '填写正则表达式',
|
172
|
-
newOption: '新选项',
|
173
|
-
tab: '标签页',
|
174
|
-
validatorRequired: '必须填写',
|
175
|
-
validatorType: '格式不正确',
|
176
|
-
validatorPattern: '格式不匹配',
|
177
|
-
showWordLimit: '显示字数统计',
|
178
|
-
maxlength: '最大字数',
|
179
|
-
}
|
180
|
-
},
|
181
|
-
upload: {
|
182
|
-
preview: '预览',
|
183
|
-
edit: '替换',
|
184
|
-
delete: '删除'
|
185
|
-
}
|
186
|
-
}
|
187
|
-
}
|
1
|
+
export default {
|
2
|
+
fm: {
|
3
|
+
components: {
|
4
|
+
fields: {
|
5
|
+
input: '单行文本',
|
6
|
+
textarea: '多行文本',
|
7
|
+
number: '计数器',
|
8
|
+
radio: '单选框组',
|
9
|
+
checkbox: '多选框组',
|
10
|
+
time: '时间选择器',
|
11
|
+
date: '日期选择器',
|
12
|
+
rate: '评分',
|
13
|
+
color: '颜色选择器',
|
14
|
+
select: '下拉选择器',
|
15
|
+
switch: '开关',
|
16
|
+
slider: '滑块',
|
17
|
+
text: '文字',
|
18
|
+
blank: '自定义区域',
|
19
|
+
fileupload: '文件',
|
20
|
+
upload: '图片',
|
21
|
+
editor: '编辑器',
|
22
|
+
cascader: '级联选择器',
|
23
|
+
table: '子表格',
|
24
|
+
grid: '栅格布局',
|
25
|
+
tabs: '标签页',
|
26
|
+
divider: '分割线'
|
27
|
+
},
|
28
|
+
basic: {
|
29
|
+
title: '基础字段',
|
30
|
+
},
|
31
|
+
advance: {
|
32
|
+
title: '高级字段',
|
33
|
+
},
|
34
|
+
layout: {
|
35
|
+
title: '布局字段',
|
36
|
+
}
|
37
|
+
},
|
38
|
+
description: {
|
39
|
+
containerEmpty: '从左侧拖拽来添加字段',
|
40
|
+
configEmpty: '请添加字段',
|
41
|
+
tableEmpty: '从左侧拖拽来添加字段',
|
42
|
+
uploadJsonInfo: 'JSON格式如下,直接复制生成的json覆盖此处代码点击确定即可'
|
43
|
+
},
|
44
|
+
message: {
|
45
|
+
copySuccess: '复制成功',
|
46
|
+
validError: '表单数据校验失败'
|
47
|
+
},
|
48
|
+
actions: {
|
49
|
+
import: '导入JSON',
|
50
|
+
clear: '清空',
|
51
|
+
preview: '预览',
|
52
|
+
json: '生成JSON',
|
53
|
+
code: '生成代码',
|
54
|
+
getData: '获取数据',
|
55
|
+
reset: '重置',
|
56
|
+
copyData: '复制数据',
|
57
|
+
cancel: '取 消',
|
58
|
+
confirm: '确 定',
|
59
|
+
addOption: '添加选项',
|
60
|
+
addColumn: '添加列',
|
61
|
+
addTab: '添加标签',
|
62
|
+
upload: '点击上传',
|
63
|
+
add: '添加'
|
64
|
+
},
|
65
|
+
config: {
|
66
|
+
form: {
|
67
|
+
title: '表单属性',
|
68
|
+
labelPosition: {
|
69
|
+
title: '标签对齐方式',
|
70
|
+
left: '左对齐',
|
71
|
+
right: '右对齐',
|
72
|
+
top: '顶部对齐'
|
73
|
+
},
|
74
|
+
labelWidth: '表单标签宽度',
|
75
|
+
size: '组件尺寸',
|
76
|
+
customClass: '自定义Class'
|
77
|
+
},
|
78
|
+
widget: {
|
79
|
+
title: '字段属性',
|
80
|
+
model: '字段标识',
|
81
|
+
name: '标题',
|
82
|
+
width: '宽度',
|
83
|
+
height: '高度',
|
84
|
+
size: '大小',
|
85
|
+
labelWidth: '标签宽度',
|
86
|
+
custom: '自定义',
|
87
|
+
placeholder: '占位内容',
|
88
|
+
layout: '布局方式',
|
89
|
+
block: '块级',
|
90
|
+
inline: '行内',
|
91
|
+
contentPosition: '文案位置',
|
92
|
+
left: '左侧',
|
93
|
+
right: '右侧',
|
94
|
+
center: '居中',
|
95
|
+
showInput: '显示输入框',
|
96
|
+
min: '最小值',
|
97
|
+
max: '最大值',
|
98
|
+
step: '步长',
|
99
|
+
multiple: '是否多选',
|
100
|
+
filterable: '是否可搜索',
|
101
|
+
allowHalf: '允许半选',
|
102
|
+
showAlpha: '支持透明度选择',
|
103
|
+
showLabel: '是否显示标签',
|
104
|
+
option: '选项',
|
105
|
+
staticData: '静态数据',
|
106
|
+
remoteData: '远端数据',
|
107
|
+
remoteFunc: '远端方法',
|
108
|
+
value: '值',
|
109
|
+
label: '标签',
|
110
|
+
childrenOption: '子选项',
|
111
|
+
defaultValue: '默认值',
|
112
|
+
showType: '显示类型',
|
113
|
+
isRange: '是否为范围选择',
|
114
|
+
isTimestamp: '是否获取时间戳',
|
115
|
+
startPlaceholder: '开始时间占位内容',
|
116
|
+
endPlaceholder: '结束时间占位内容',
|
117
|
+
format: '格式',
|
118
|
+
limit: '最大上传数',
|
119
|
+
isQiniu: '使用七牛上传',
|
120
|
+
tokenFunc: '获取七牛Token方法',
|
121
|
+
imageAction: '图片上传地址',
|
122
|
+
tip: '提示说明文字',
|
123
|
+
action: '上传地址',
|
124
|
+
defaultType: '绑定数据类型',
|
125
|
+
string: '字符串',
|
126
|
+
object: '对象',
|
127
|
+
array: '数组',
|
128
|
+
number: '数字',
|
129
|
+
boolean: '布尔值',
|
130
|
+
integer: '整数',
|
131
|
+
float: '浮点数',
|
132
|
+
url: 'URL地址',
|
133
|
+
email: '邮箱地址',
|
134
|
+
hex: '十六进制',
|
135
|
+
gutter: '栅格间隔',
|
136
|
+
columnOption: '列配置项',
|
137
|
+
span: '栅格值',
|
138
|
+
justify: '水平排列方式',
|
139
|
+
justifyStart: '左对齐',
|
140
|
+
justifyEnd: '右对齐',
|
141
|
+
justifyCenter: '居中',
|
142
|
+
justifySpaceAround: '两侧间隔相等',
|
143
|
+
justifySpaceBetween: '两端对齐',
|
144
|
+
align: '垂直排列方式',
|
145
|
+
alignTop: '顶部对齐',
|
146
|
+
alignMiddle: '居中',
|
147
|
+
alignBottom: '底部对齐',
|
148
|
+
type: '风格类型',
|
149
|
+
default: '默认',
|
150
|
+
card: '选项卡',
|
151
|
+
borderCard: '卡片化',
|
152
|
+
tabPosition: '选项卡位置',
|
153
|
+
top: '顶部',
|
154
|
+
bottom: '底部',
|
155
|
+
tabOption: '标签配置项',
|
156
|
+
tabName: '标签名称',
|
157
|
+
customClass: '自定义Class',
|
158
|
+
attribute: '操作属性',
|
159
|
+
dataBind: '数据绑定',
|
160
|
+
hidden: '隐藏',
|
161
|
+
readonly: '完全只读',
|
162
|
+
disabled: '禁用',
|
163
|
+
editable: '文本框可输入',
|
164
|
+
clearable: '显示清除按钮',
|
165
|
+
arrowControl: '使用箭头进行时间选择',
|
166
|
+
isDelete: '删除',
|
167
|
+
isEdit: '编辑',
|
168
|
+
showPassword: '显示密码',
|
169
|
+
validate: '校验',
|
170
|
+
required: '必填',
|
171
|
+
patternPlaceholder: '填写正则表达式',
|
172
|
+
newOption: '新选项',
|
173
|
+
tab: '标签页',
|
174
|
+
validatorRequired: '必须填写',
|
175
|
+
validatorType: '格式不正确',
|
176
|
+
validatorPattern: '格式不匹配',
|
177
|
+
showWordLimit: '显示字数统计',
|
178
|
+
maxlength: '最大字数',
|
179
|
+
}
|
180
|
+
},
|
181
|
+
upload: {
|
182
|
+
preview: '预览',
|
183
|
+
edit: '替换',
|
184
|
+
delete: '删除'
|
185
|
+
}
|
186
|
+
}
|
187
|
+
}
|
@@ -1,88 +1,88 @@
|
|
1
|
-
import axios from "axios";
|
2
|
-
import Log from "../util/Log";
|
3
|
-
import appConfig from "../config/index";
|
4
|
-
import { Notification } from "element-ui";
|
5
|
-
|
6
|
-
export const init = baseConfig => {
|
7
|
-
// 创建axios实例
|
8
|
-
const Axios = axios.create({
|
9
|
-
baseURL: baseConfig.baseUrl,
|
10
|
-
timeout: 60000 // 请求超时时间
|
11
|
-
// withCredentials: true, //允许携带cookie
|
12
|
-
});
|
13
|
-
|
14
|
-
// 添加请求拦截器
|
15
|
-
Axios.interceptors.request.use(
|
16
|
-
config => {
|
17
|
-
const info = sessionStorage.getItem(appConfig.storageKeys.oauthConfig);
|
18
|
-
if (info) {
|
19
|
-
const oauthInfo = JSON.parse(info);
|
20
|
-
config.baseURL = oauthInfo.baseUrl;
|
21
|
-
config.headers["Authorization"] = oauthInfo.token;
|
22
|
-
}
|
23
|
-
if (baseConfig.headers) {
|
24
|
-
config.headers = Object.assign(config.headers, baseConfig.headers);
|
25
|
-
}
|
26
|
-
return config;
|
27
|
-
},
|
28
|
-
error => {
|
29
|
-
Promise.reject(error);
|
30
|
-
}
|
31
|
-
);
|
32
|
-
|
33
|
-
// 添加响应拦截器
|
34
|
-
Axios.interceptors.response.use(
|
35
|
-
response => {
|
36
|
-
const code = response.status;
|
37
|
-
if (code < 200 || code > 300) {
|
38
|
-
Notification.error({
|
39
|
-
title: response.message
|
40
|
-
});
|
41
|
-
return Promise.reject("error");
|
42
|
-
}
|
43
|
-
|
44
|
-
const dataCode = response.data.code;
|
45
|
-
if (dataCode && dataCode !== 200) {
|
46
|
-
Notification.error({
|
47
|
-
title: response.data.message
|
48
|
-
});
|
49
|
-
return Promise.reject("error");
|
50
|
-
}
|
51
|
-
|
52
|
-
if (baseConfig.debug) {
|
53
|
-
Log.prettyPrimary("Request Url:", response.request.responseURL);
|
54
|
-
Log.prettySuccess("Request Res:", response);
|
55
|
-
}
|
56
|
-
|
57
|
-
return response.data;
|
58
|
-
},
|
59
|
-
error => {
|
60
|
-
let code = 0;
|
61
|
-
try {
|
62
|
-
code = error.response.data.status;
|
63
|
-
} catch (e) {
|
64
|
-
if (error.toString().indexOf("Error: timeout") !== -1) {
|
65
|
-
Notification.error({
|
66
|
-
title: "网络请求超时",
|
67
|
-
duration: 5000
|
68
|
-
});
|
69
|
-
return Promise.reject(error);
|
70
|
-
}
|
71
|
-
}
|
72
|
-
if (code) {
|
73
|
-
const errorMsg = error.response.data.message;
|
74
|
-
Notification.error({
|
75
|
-
title: errorMsg || "未知错误",
|
76
|
-
duration: 5000
|
77
|
-
});
|
78
|
-
} else {
|
79
|
-
Notification.error({
|
80
|
-
title: "接口请求失败",
|
81
|
-
duration: 5000
|
82
|
-
});
|
83
|
-
}
|
84
|
-
return Promise.reject(error);
|
85
|
-
}
|
86
|
-
);
|
87
|
-
return Axios;
|
88
|
-
};
|
1
|
+
import axios from "axios";
|
2
|
+
import Log from "../util/Log";
|
3
|
+
import appConfig from "../config/index";
|
4
|
+
import { Notification } from "element-ui";
|
5
|
+
|
6
|
+
export const init = baseConfig => {
|
7
|
+
// 创建axios实例
|
8
|
+
const Axios = axios.create({
|
9
|
+
baseURL: baseConfig.baseUrl,
|
10
|
+
timeout: 60000 // 请求超时时间
|
11
|
+
// withCredentials: true, //允许携带cookie
|
12
|
+
});
|
13
|
+
|
14
|
+
// 添加请求拦截器
|
15
|
+
Axios.interceptors.request.use(
|
16
|
+
config => {
|
17
|
+
const info = sessionStorage.getItem(appConfig.storageKeys.oauthConfig);
|
18
|
+
if (info) {
|
19
|
+
const oauthInfo = JSON.parse(info);
|
20
|
+
config.baseURL = oauthInfo.baseUrl;
|
21
|
+
config.headers["Authorization"] = oauthInfo.token;
|
22
|
+
}
|
23
|
+
if (baseConfig.headers) {
|
24
|
+
config.headers = Object.assign(config.headers, baseConfig.headers);
|
25
|
+
}
|
26
|
+
return config;
|
27
|
+
},
|
28
|
+
error => {
|
29
|
+
Promise.reject(error);
|
30
|
+
}
|
31
|
+
);
|
32
|
+
|
33
|
+
// 添加响应拦截器
|
34
|
+
Axios.interceptors.response.use(
|
35
|
+
response => {
|
36
|
+
const code = response.status;
|
37
|
+
if (code < 200 || code > 300) {
|
38
|
+
Notification.error({
|
39
|
+
title: response.message
|
40
|
+
});
|
41
|
+
return Promise.reject("error");
|
42
|
+
}
|
43
|
+
|
44
|
+
const dataCode = response.data.code;
|
45
|
+
if (dataCode && dataCode !== 200) {
|
46
|
+
Notification.error({
|
47
|
+
title: response.data.message
|
48
|
+
});
|
49
|
+
return Promise.reject("error");
|
50
|
+
}
|
51
|
+
|
52
|
+
if (baseConfig.debug) {
|
53
|
+
Log.prettyPrimary("Request Url:", response.request.responseURL);
|
54
|
+
Log.prettySuccess("Request Res:", response);
|
55
|
+
}
|
56
|
+
|
57
|
+
return response.data;
|
58
|
+
},
|
59
|
+
error => {
|
60
|
+
let code = 0;
|
61
|
+
try {
|
62
|
+
code = error.response.data.status;
|
63
|
+
} catch (e) {
|
64
|
+
if (error.toString().indexOf("Error: timeout") !== -1) {
|
65
|
+
Notification.error({
|
66
|
+
title: "网络请求超时",
|
67
|
+
duration: 5000
|
68
|
+
});
|
69
|
+
return Promise.reject(error);
|
70
|
+
}
|
71
|
+
}
|
72
|
+
if (code) {
|
73
|
+
const errorMsg = error.response.data.message;
|
74
|
+
Notification.error({
|
75
|
+
title: errorMsg || "未知错误",
|
76
|
+
duration: 5000
|
77
|
+
});
|
78
|
+
} else {
|
79
|
+
Notification.error({
|
80
|
+
title: "接口请求失败",
|
81
|
+
duration: 5000
|
82
|
+
});
|
83
|
+
}
|
84
|
+
return Promise.reject(error);
|
85
|
+
}
|
86
|
+
);
|
87
|
+
return Axios;
|
88
|
+
};
|