ls-pro-common 1.0.49 → 1.0.50
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/dist/common.css +42 -8
- package/dist/common.js +1 -1
- package/dist/common.min.css +42 -8
- package/dist/common.min.js +1 -1
- package/es/components/InputTable.d.ts +2 -0
- package/es/components/InputTable.js +9 -3
- package/es/http/index.js +30 -15
- package/lib/components/InputTable.d.ts +2 -0
- package/lib/components/InputTable.js +9 -3
- package/lib/components/common.less +51 -51
- package/lib/http/index.js +30 -15
- package/package.json +3 -3
|
@@ -41,6 +41,7 @@ export declare type InputTableProps = ProFormItemProps<InputProps> & {
|
|
|
41
41
|
beforeLoad?: (param: any) => void;
|
|
42
42
|
/**@name 加载之后事件,row为接口返回数据,可以通过此方法调整 */
|
|
43
43
|
afterLoad?: (rows: any[]) => void;
|
|
44
|
+
getPopupContainer?: (triggerNode: any) => HTMLElement;
|
|
44
45
|
};
|
|
45
46
|
declare const InputTable: React.ForwardRefExoticComponent<{
|
|
46
47
|
fieldProps?: (import("../../../form/lib/interface").FieldProps & InputProps) | undefined;
|
|
@@ -91,5 +92,6 @@ declare const InputTable: React.ForwardRefExoticComponent<{
|
|
|
91
92
|
beforeLoad?: ((param: any) => void) | undefined;
|
|
92
93
|
/**@name 加载之后事件,row为接口返回数据,可以通过此方法调整 */
|
|
93
94
|
afterLoad?: ((rows: any[]) => void) | undefined;
|
|
95
|
+
getPopupContainer?: ((triggerNode: any) => HTMLElement) | undefined;
|
|
94
96
|
} & React.RefAttributes<unknown>>;
|
|
95
97
|
export default InputTable;
|
|
@@ -10,7 +10,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
10
10
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
11
11
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
12
12
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
13
|
-
var _excluded = ["columns", "url", "textName", "name", "tableConfig", "tableHeight", "tableWidth", "readonly", "multiple", "valueField", "labelWidth", "textField", "onSelectChange", "beforeLoad", "afterLoad", "isV2", "allowClear", "keepSelect", "fieldProps", "searchField", "fillMap", "loadOnShow", "triggerCheck"],
|
|
13
|
+
var _excluded = ["columns", "url", "textName", "name", "tableConfig", "tableHeight", "tableWidth", "readonly", "multiple", "valueField", "labelWidth", "textField", "onSelectChange", "beforeLoad", "afterLoad", "isV2", "allowClear", "keepSelect", "fieldProps", "searchField", "fillMap", "loadOnShow", "triggerCheck", "getPopupContainer"],
|
|
14
14
|
_excluded2 = ["current", "pageSize"];
|
|
15
15
|
import React, { useRef, useState, useEffect, useContext, useMemo, useImperativeHandle } from 'react';
|
|
16
16
|
import ProTable from 'ls-pro-table';
|
|
@@ -77,6 +77,10 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
77
77
|
loadOnShow = _prop$loadOnShow === void 0 ? false : _prop$loadOnShow,
|
|
78
78
|
_prop$triggerCheck = prop.triggerCheck,
|
|
79
79
|
triggerCheck = _prop$triggerCheck === void 0 ? 'entry' : _prop$triggerCheck,
|
|
80
|
+
_prop$getPopupContain = prop.getPopupContainer,
|
|
81
|
+
getPopupContainer = _prop$getPopupContain === void 0 ? function (triggerNode) {
|
|
82
|
+
return triggerNode.parentNode;
|
|
83
|
+
} : _prop$getPopupContain,
|
|
80
84
|
rest = _objectWithoutProperties(prop, _excluded); //显示输入框绑定的name,如果不设置textName,设置为$name__text
|
|
81
85
|
|
|
82
86
|
|
|
@@ -348,7 +352,8 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
348
352
|
}, loadOnShow ? visible ? tableDom : null : tableDom),
|
|
349
353
|
trigger: "click",
|
|
350
354
|
visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
|
|
351
|
-
onVisibleChange: setVisible
|
|
355
|
+
onVisibleChange: setVisible,
|
|
356
|
+
getPopupContainer: getPopupContainer
|
|
352
357
|
}, /*#__PURE__*/React.createElement(MoreOutlined, {
|
|
353
358
|
onClick: function onClick(e) {
|
|
354
359
|
setVisible(true);
|
|
@@ -385,7 +390,8 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
385
390
|
}, loadOnShow ? visible ? tableDom : null : tableDom),
|
|
386
391
|
trigger: "click",
|
|
387
392
|
visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
|
|
388
|
-
onVisibleChange: setVisible
|
|
393
|
+
onVisibleChange: setVisible,
|
|
394
|
+
getPopupContainer: getPopupContainer
|
|
389
395
|
}, /*#__PURE__*/React.createElement(MoreOutlined, {
|
|
390
396
|
onClick: function onClick(e) {
|
|
391
397
|
setVisible(true);
|
package/es/http/index.js
CHANGED
|
@@ -40,36 +40,51 @@ request.interceptors.request.use(function (url, options) {
|
|
|
40
40
|
|
|
41
41
|
request.interceptors.response.use( /*#__PURE__*/function () {
|
|
42
42
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(response, options) {
|
|
43
|
-
var noMsg, _data$flag, _data$flag2,
|
|
43
|
+
var noMsg, _data$flag, data, _data$flag2, _data$flag3, _data, retCode, retMsg, status;
|
|
44
44
|
|
|
45
45
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
46
46
|
while (1) {
|
|
47
47
|
switch (_context.prev = _context.next) {
|
|
48
48
|
case 0:
|
|
49
|
-
noMsg = getUrlQuery('noMsg', options.url);
|
|
49
|
+
noMsg = getUrlQuery('noMsg', options.url); // http 状态码错误
|
|
50
50
|
|
|
51
51
|
if (!(response.status < 200 || response.status >= 300)) {
|
|
52
|
-
_context.next =
|
|
52
|
+
_context.next = 14;
|
|
53
53
|
break;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
_context.prev = 2;
|
|
57
|
+
_context.next = 5;
|
|
58
|
+
return response.clone().json();
|
|
59
|
+
|
|
60
|
+
case 5:
|
|
61
|
+
data = _context.sent;
|
|
62
|
+
showError(options.url + ((_data$flag = data.flag) === null || _data$flag === void 0 ? void 0 : _data$flag.retMsg));
|
|
63
|
+
_context.next = 12;
|
|
64
|
+
break;
|
|
65
|
+
|
|
66
|
+
case 9:
|
|
67
|
+
_context.prev = 9;
|
|
68
|
+
_context.t0 = _context["catch"](2);
|
|
56
69
|
showError(options.url + response.statusText);
|
|
57
|
-
|
|
70
|
+
|
|
71
|
+
case 12:
|
|
72
|
+
_context.next = 22;
|
|
58
73
|
break;
|
|
59
74
|
|
|
60
|
-
case
|
|
61
|
-
if (!(noMsg
|
|
62
|
-
_context.next =
|
|
75
|
+
case 14:
|
|
76
|
+
if (!(noMsg !== '1')) {
|
|
77
|
+
_context.next = 22;
|
|
63
78
|
break;
|
|
64
79
|
}
|
|
65
80
|
|
|
66
|
-
_context.next =
|
|
81
|
+
_context.next = 17;
|
|
67
82
|
return response.clone().json();
|
|
68
83
|
|
|
69
|
-
case
|
|
70
|
-
|
|
71
|
-
retCode = (
|
|
72
|
-
retMsg = ((_data$
|
|
84
|
+
case 17:
|
|
85
|
+
_data = _context.sent;
|
|
86
|
+
retCode = (_data === null || _data === void 0 ? void 0 : (_data$flag2 = _data.flag) === null || _data$flag2 === void 0 ? void 0 : _data$flag2.retCode) || '0';
|
|
87
|
+
retMsg = ((_data$flag3 = _data.flag) === null || _data$flag3 === void 0 ? void 0 : _data$flag3.retMsg) || '访问接口出错';
|
|
73
88
|
status = (getUrlQuery('apiStatus') || '0').split(',');
|
|
74
89
|
|
|
75
90
|
if (retCode && !status.includes(retCode)) {
|
|
@@ -80,15 +95,15 @@ request.interceptors.response.use( /*#__PURE__*/function () {
|
|
|
80
95
|
}
|
|
81
96
|
}
|
|
82
97
|
|
|
83
|
-
case
|
|
98
|
+
case 22:
|
|
84
99
|
return _context.abrupt("return", response);
|
|
85
100
|
|
|
86
|
-
case
|
|
101
|
+
case 23:
|
|
87
102
|
case "end":
|
|
88
103
|
return _context.stop();
|
|
89
104
|
}
|
|
90
105
|
}
|
|
91
|
-
}, _callee);
|
|
106
|
+
}, _callee, null, [[2, 9]]);
|
|
92
107
|
}));
|
|
93
108
|
|
|
94
109
|
return function (_x, _x2) {
|
|
@@ -41,6 +41,7 @@ export declare type InputTableProps = ProFormItemProps<InputProps> & {
|
|
|
41
41
|
beforeLoad?: (param: any) => void;
|
|
42
42
|
/**@name 加载之后事件,row为接口返回数据,可以通过此方法调整 */
|
|
43
43
|
afterLoad?: (rows: any[]) => void;
|
|
44
|
+
getPopupContainer?: (triggerNode: any) => HTMLElement;
|
|
44
45
|
};
|
|
45
46
|
declare const InputTable: React.ForwardRefExoticComponent<{
|
|
46
47
|
fieldProps?: (import("../../../form/lib/interface").FieldProps & InputProps) | undefined;
|
|
@@ -91,5 +92,6 @@ declare const InputTable: React.ForwardRefExoticComponent<{
|
|
|
91
92
|
beforeLoad?: ((param: any) => void) | undefined;
|
|
92
93
|
/**@name 加载之后事件,row为接口返回数据,可以通过此方法调整 */
|
|
93
94
|
afterLoad?: ((rows: any[]) => void) | undefined;
|
|
95
|
+
getPopupContainer?: ((triggerNode: any) => HTMLElement) | undefined;
|
|
94
96
|
} & React.RefAttributes<unknown>>;
|
|
95
97
|
export default InputTable;
|
|
@@ -45,7 +45,7 @@ var _http = require("../http");
|
|
|
45
45
|
|
|
46
46
|
var _utils = require("../utils");
|
|
47
47
|
|
|
48
|
-
var _excluded = ["columns", "url", "textName", "name", "tableConfig", "tableHeight", "tableWidth", "readonly", "multiple", "valueField", "labelWidth", "textField", "onSelectChange", "beforeLoad", "afterLoad", "isV2", "allowClear", "keepSelect", "fieldProps", "searchField", "fillMap", "loadOnShow", "triggerCheck"],
|
|
48
|
+
var _excluded = ["columns", "url", "textName", "name", "tableConfig", "tableHeight", "tableWidth", "readonly", "multiple", "valueField", "labelWidth", "textField", "onSelectChange", "beforeLoad", "afterLoad", "isV2", "allowClear", "keepSelect", "fieldProps", "searchField", "fillMap", "loadOnShow", "triggerCheck", "getPopupContainer"],
|
|
49
49
|
_excluded2 = ["current", "pageSize"];
|
|
50
50
|
|
|
51
51
|
var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
|
|
@@ -106,6 +106,10 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
|
|
|
106
106
|
loadOnShow = _prop$loadOnShow === void 0 ? false : _prop$loadOnShow,
|
|
107
107
|
_prop$triggerCheck = prop.triggerCheck,
|
|
108
108
|
triggerCheck = _prop$triggerCheck === void 0 ? 'entry' : _prop$triggerCheck,
|
|
109
|
+
_prop$getPopupContain = prop.getPopupContainer,
|
|
110
|
+
getPopupContainer = _prop$getPopupContain === void 0 ? function (triggerNode) {
|
|
111
|
+
return triggerNode.parentNode;
|
|
112
|
+
} : _prop$getPopupContain,
|
|
109
113
|
rest = (0, _objectWithoutProperties2.default)(prop, _excluded); //显示输入框绑定的name,如果不设置textName,设置为$name__text
|
|
110
114
|
|
|
111
115
|
var textNameProp = (0, _react.useMemo)(function () {
|
|
@@ -377,7 +381,8 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
|
|
|
377
381
|
}, loadOnShow ? visible ? tableDom : null : tableDom),
|
|
378
382
|
trigger: "click",
|
|
379
383
|
visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
|
|
380
|
-
onVisibleChange: setVisible
|
|
384
|
+
onVisibleChange: setVisible,
|
|
385
|
+
getPopupContainer: getPopupContainer
|
|
381
386
|
}, /*#__PURE__*/_react.default.createElement(_icons.MoreOutlined, {
|
|
382
387
|
onClick: function onClick(e) {
|
|
383
388
|
setVisible(true);
|
|
@@ -414,7 +419,8 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
|
|
|
414
419
|
}, loadOnShow ? visible ? tableDom : null : tableDom),
|
|
415
420
|
trigger: "click",
|
|
416
421
|
visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
|
|
417
|
-
onVisibleChange: setVisible
|
|
422
|
+
onVisibleChange: setVisible,
|
|
423
|
+
getPopupContainer: getPopupContainer
|
|
418
424
|
}, /*#__PURE__*/_react.default.createElement(_icons.MoreOutlined, {
|
|
419
425
|
onClick: function onClick(e) {
|
|
420
426
|
setVisible(true);
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
body {
|
|
2
|
-
--ant-primary-color: #4997E6;
|
|
3
|
-
--ant-primary-color-hover: #74b7f2;
|
|
4
|
-
--ant-primary-color-active: #3475bf;
|
|
5
|
-
--ant-primary-color-outline: rgba(73, 151, 230, 0.2);
|
|
6
|
-
--ant-primary-1: #f0faff;
|
|
7
|
-
--ant-primary-2: #f0f9ff;
|
|
8
|
-
--ant-primary-3: #ccebff;
|
|
9
|
-
--ant-primary-4: #a3d7ff;
|
|
10
|
-
--ant-primary-5: #74b7f2;
|
|
11
|
-
--ant-primary-6: #4997E6;
|
|
12
|
-
--ant-primary-7: #3475bf;
|
|
13
|
-
--ant-primary-color-deprecated-pure: #e6f1fc;
|
|
14
|
-
--ant-primary-color-deprecated-l-35: #e6f1fc;
|
|
15
|
-
--ant-primary-color-deprecated-l-20: #a3caf2;
|
|
16
|
-
--ant-primary-color-deprecated-t-20: #6daceb;
|
|
17
|
-
--ant-primary-color-deprecated-t-50: #a4cbf3;
|
|
18
|
-
--ant-primary-color-deprecated-f-12: rgba(73, 151, 230, 0.12);
|
|
2
|
+
--ant-primary-color : #4997E6;
|
|
3
|
+
--ant-primary-color-hover : #74b7f2;
|
|
4
|
+
--ant-primary-color-active : #3475bf;
|
|
5
|
+
--ant-primary-color-outline : rgba(73, 151, 230, 0.2);
|
|
6
|
+
--ant-primary-1 : #f0faff;
|
|
7
|
+
--ant-primary-2 : #f0f9ff;
|
|
8
|
+
--ant-primary-3 : #ccebff;
|
|
9
|
+
--ant-primary-4 : #a3d7ff;
|
|
10
|
+
--ant-primary-5 : #74b7f2;
|
|
11
|
+
--ant-primary-6 : #4997E6;
|
|
12
|
+
--ant-primary-7 : #3475bf;
|
|
13
|
+
--ant-primary-color-deprecated-pure : #e6f1fc;
|
|
14
|
+
--ant-primary-color-deprecated-l-35 : #e6f1fc;
|
|
15
|
+
--ant-primary-color-deprecated-l-20 : #a3caf2;
|
|
16
|
+
--ant-primary-color-deprecated-t-20 : #6daceb;
|
|
17
|
+
--ant-primary-color-deprecated-t-50 : #a4cbf3;
|
|
18
|
+
--ant-primary-color-deprecated-f-12 : rgba(73, 151, 230, 0.12);
|
|
19
19
|
--ant-primary-color-active-deprecated-f-30: rgba(240, 250, 255, 0.3);
|
|
20
20
|
--ant-primary-color-active-deprecated-d-02: #e6f7ff;
|
|
21
|
-
--ant-success-color: #52c41a;
|
|
22
|
-
--ant-success-color-hover: #73d13d;
|
|
23
|
-
--ant-success-color-active: #389e0d;
|
|
24
|
-
--ant-success-color-outline: rgba(82, 196, 26, 0.2);
|
|
25
|
-
--ant-success-color-deprecated-bg: #f6ffed;
|
|
26
|
-
--ant-success-color-deprecated-border: #b7eb8f;
|
|
27
|
-
--ant-error-color: #ff4d4f;
|
|
28
|
-
--ant-error-color-hover: #ff7875;
|
|
29
|
-
--ant-error-color-active: #d9363e;
|
|
30
|
-
--ant-error-color-outline: rgba(255, 77, 79, 0.2);
|
|
31
|
-
--ant-error-color-deprecated-bg: #fff2f0;
|
|
32
|
-
--ant-error-color-deprecated-border: #ffccc7;
|
|
33
|
-
--ant-warning-color: #faad14;
|
|
34
|
-
--ant-warning-color-hover: #ffc53d;
|
|
35
|
-
--ant-warning-color-active: #d48806;
|
|
36
|
-
--ant-warning-color-outline: rgba(250, 173, 20, 0.2);
|
|
37
|
-
--ant-warning-color-deprecated-bg: #fffbe6;
|
|
38
|
-
--ant-warning-color-deprecated-border: #ffe58f;
|
|
39
|
-
--ant-info-color: #4997E6;
|
|
40
|
-
--ant-info-color-deprecated-bg: #f0faff;
|
|
41
|
-
--ant-info-color-deprecated-border: #ccebff;
|
|
42
|
-
|
|
21
|
+
--ant-success-color : #52c41a;
|
|
22
|
+
--ant-success-color-hover : #73d13d;
|
|
23
|
+
--ant-success-color-active : #389e0d;
|
|
24
|
+
--ant-success-color-outline : rgba(82, 196, 26, 0.2);
|
|
25
|
+
--ant-success-color-deprecated-bg : #f6ffed;
|
|
26
|
+
--ant-success-color-deprecated-border : #b7eb8f;
|
|
27
|
+
--ant-error-color : #ff4d4f;
|
|
28
|
+
--ant-error-color-hover : #ff7875;
|
|
29
|
+
--ant-error-color-active : #d9363e;
|
|
30
|
+
--ant-error-color-outline : rgba(255, 77, 79, 0.2);
|
|
31
|
+
--ant-error-color-deprecated-bg : #fff2f0;
|
|
32
|
+
--ant-error-color-deprecated-border : #ffccc7;
|
|
33
|
+
--ant-warning-color : #faad14;
|
|
34
|
+
--ant-warning-color-hover : #ffc53d;
|
|
35
|
+
--ant-warning-color-active : #d48806;
|
|
36
|
+
--ant-warning-color-outline : rgba(250, 173, 20, 0.2);
|
|
37
|
+
--ant-warning-color-deprecated-bg : #fffbe6;
|
|
38
|
+
--ant-warning-color-deprecated-border : #ffe58f;
|
|
39
|
+
--ant-info-color : #4997E6;
|
|
40
|
+
--ant-info-color-deprecated-bg : #f0faff;
|
|
41
|
+
--ant-info-color-deprecated-border : #ccebff;
|
|
42
|
+
}
|
|
43
43
|
|
|
44
44
|
.dtl-layout {
|
|
45
45
|
position : absolute;
|
|
@@ -135,24 +135,24 @@ body {
|
|
|
135
135
|
border-radius: 4px;
|
|
136
136
|
border-color : var(--ant-primary-color);
|
|
137
137
|
color : var(--ant-primary-color);
|
|
138
|
-
|
|
138
|
+
|
|
139
139
|
&:active {
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
border-color: var(--ant-primary-color-hover);
|
|
141
|
+
color : var(--ant-primary-color-hover);
|
|
142
142
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.ant-btn-primary {
|
|
146
146
|
color: #fff;
|
|
147
|
-
|
|
147
|
+
}
|
|
148
148
|
|
|
149
|
-
|
|
150
|
-
color: var(--ant-error-color);
|
|
149
|
+
.ant-btn-dangerous {
|
|
150
|
+
color : var(--ant-error-color);
|
|
151
151
|
border-color: var(--ant-error-color);
|
|
152
|
-
background: #fff;
|
|
153
|
-
|
|
152
|
+
background : #fff;
|
|
153
|
+
}
|
|
154
154
|
|
|
155
|
-
|
|
155
|
+
a {
|
|
156
156
|
color: var(--ant-primary-color);
|
|
157
157
|
}
|
|
158
158
|
|
package/lib/http/index.js
CHANGED
|
@@ -59,36 +59,51 @@ request.interceptors.request.use(function (url, options) {
|
|
|
59
59
|
|
|
60
60
|
request.interceptors.response.use( /*#__PURE__*/function () {
|
|
61
61
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(response, options) {
|
|
62
|
-
var noMsg, _data$flag, _data$flag2,
|
|
62
|
+
var noMsg, _data$flag, data, _data$flag2, _data$flag3, _data, retCode, retMsg, status;
|
|
63
63
|
|
|
64
64
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
65
65
|
while (1) {
|
|
66
66
|
switch (_context.prev = _context.next) {
|
|
67
67
|
case 0:
|
|
68
|
-
noMsg = (0, _utils.getUrlQuery)('noMsg', options.url);
|
|
68
|
+
noMsg = (0, _utils.getUrlQuery)('noMsg', options.url); // http 状态码错误
|
|
69
69
|
|
|
70
70
|
if (!(response.status < 200 || response.status >= 300)) {
|
|
71
|
-
_context.next =
|
|
71
|
+
_context.next = 14;
|
|
72
72
|
break;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
_context.prev = 2;
|
|
76
|
+
_context.next = 5;
|
|
77
|
+
return response.clone().json();
|
|
78
|
+
|
|
79
|
+
case 5:
|
|
80
|
+
data = _context.sent;
|
|
81
|
+
(0, _utils.showError)(options.url + ((_data$flag = data.flag) === null || _data$flag === void 0 ? void 0 : _data$flag.retMsg));
|
|
82
|
+
_context.next = 12;
|
|
83
|
+
break;
|
|
84
|
+
|
|
85
|
+
case 9:
|
|
86
|
+
_context.prev = 9;
|
|
87
|
+
_context.t0 = _context["catch"](2);
|
|
75
88
|
(0, _utils.showError)(options.url + response.statusText);
|
|
76
|
-
|
|
89
|
+
|
|
90
|
+
case 12:
|
|
91
|
+
_context.next = 22;
|
|
77
92
|
break;
|
|
78
93
|
|
|
79
|
-
case
|
|
80
|
-
if (!(noMsg
|
|
81
|
-
_context.next =
|
|
94
|
+
case 14:
|
|
95
|
+
if (!(noMsg !== '1')) {
|
|
96
|
+
_context.next = 22;
|
|
82
97
|
break;
|
|
83
98
|
}
|
|
84
99
|
|
|
85
|
-
_context.next =
|
|
100
|
+
_context.next = 17;
|
|
86
101
|
return response.clone().json();
|
|
87
102
|
|
|
88
|
-
case
|
|
89
|
-
|
|
90
|
-
retCode = (
|
|
91
|
-
retMsg = ((_data$
|
|
103
|
+
case 17:
|
|
104
|
+
_data = _context.sent;
|
|
105
|
+
retCode = (_data === null || _data === void 0 ? void 0 : (_data$flag2 = _data.flag) === null || _data$flag2 === void 0 ? void 0 : _data$flag2.retCode) || '0';
|
|
106
|
+
retMsg = ((_data$flag3 = _data.flag) === null || _data$flag3 === void 0 ? void 0 : _data$flag3.retMsg) || '访问接口出错';
|
|
92
107
|
status = ((0, _utils.getUrlQuery)('apiStatus') || '0').split(',');
|
|
93
108
|
|
|
94
109
|
if (retCode && !status.includes(retCode)) {
|
|
@@ -99,15 +114,15 @@ request.interceptors.response.use( /*#__PURE__*/function () {
|
|
|
99
114
|
}
|
|
100
115
|
}
|
|
101
116
|
|
|
102
|
-
case
|
|
117
|
+
case 22:
|
|
103
118
|
return _context.abrupt("return", response);
|
|
104
119
|
|
|
105
|
-
case
|
|
120
|
+
case 23:
|
|
106
121
|
case "end":
|
|
107
122
|
return _context.stop();
|
|
108
123
|
}
|
|
109
124
|
}
|
|
110
|
-
}, _callee);
|
|
125
|
+
}, _callee, null, [[2, 9]]);
|
|
111
126
|
}));
|
|
112
127
|
|
|
113
128
|
return function (_x, _x2) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ls-pro-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.50",
|
|
4
4
|
"description": "ls-pro-common",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antd",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@ant-design/icons": "^4.3.0",
|
|
31
|
-
"ls-pro-table": "2.62.
|
|
32
|
-
"ls-pro-form": "1.52.
|
|
31
|
+
"ls-pro-table": "2.62.38",
|
|
32
|
+
"ls-pro-form": "1.52.28",
|
|
33
33
|
"@babel/runtime": "^7.16.3",
|
|
34
34
|
"classnames": "^2.2.6",
|
|
35
35
|
"moment": "^2.27.0",
|