ls-pro-common 1.0.47 → 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 -0
- package/dist/common.js +1 -1
- package/dist/common.min.css +42 -0
- package/dist/common.min.js +1 -1
- package/es/components/InputTable.d.ts +4 -0
- package/es/components/InputTable.js +14 -6
- package/es/components/common.less +58 -50
- package/es/http/index.js +35 -15
- package/lib/components/InputTable.d.ts +4 -0
- package/lib/components/InputTable.js +14 -6
- package/lib/components/common.less +58 -50
- package/lib/http/index.js +35 -15
- package/package.json +3 -3
|
@@ -34,12 +34,14 @@ export declare type InputTableProps = ProFormItemProps<InputProps> & {
|
|
|
34
34
|
fillMap?: Record<string, string>;
|
|
35
35
|
/**@name 输入后检查数据的触发方式,默认为entry回车触发 */
|
|
36
36
|
triggerCheck?: 'entry' | 'blur';
|
|
37
|
+
loadOnShow?: boolean;
|
|
37
38
|
/**@name 选择行事件 */
|
|
38
39
|
onSelectChange?: (item: any, formRef?: any) => void;
|
|
39
40
|
/**@name 加载之前事件,param为查询条件对象,可以通过此方法调整 */
|
|
40
41
|
beforeLoad?: (param: any) => void;
|
|
41
42
|
/**@name 加载之后事件,row为接口返回数据,可以通过此方法调整 */
|
|
42
43
|
afterLoad?: (rows: any[]) => void;
|
|
44
|
+
getPopupContainer?: (triggerNode: any) => HTMLElement;
|
|
43
45
|
};
|
|
44
46
|
declare const InputTable: React.ForwardRefExoticComponent<{
|
|
45
47
|
fieldProps?: (import("../../../form/lib/interface").FieldProps & InputProps) | undefined;
|
|
@@ -83,11 +85,13 @@ declare const InputTable: React.ForwardRefExoticComponent<{
|
|
|
83
85
|
fillMap?: Record<string, string> | undefined;
|
|
84
86
|
/**@name 输入后检查数据的触发方式,默认为entry回车触发 */
|
|
85
87
|
triggerCheck?: "entry" | "blur" | undefined;
|
|
88
|
+
loadOnShow?: boolean | undefined;
|
|
86
89
|
/**@name 选择行事件 */
|
|
87
90
|
onSelectChange?: ((item: any, formRef?: any) => void) | undefined;
|
|
88
91
|
/**@name 加载之前事件,param为查询条件对象,可以通过此方法调整 */
|
|
89
92
|
beforeLoad?: ((param: any) => void) | undefined;
|
|
90
93
|
/**@name 加载之后事件,row为接口返回数据,可以通过此方法调整 */
|
|
91
94
|
afterLoad?: ((rows: any[]) => void) | undefined;
|
|
95
|
+
getPopupContainer?: ((triggerNode: any) => HTMLElement) | undefined;
|
|
92
96
|
} & React.RefAttributes<unknown>>;
|
|
93
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", "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';
|
|
@@ -73,8 +73,14 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
73
73
|
fieldProps = prop.fieldProps,
|
|
74
74
|
searchField = prop.searchField,
|
|
75
75
|
fillMap = prop.fillMap,
|
|
76
|
+
_prop$loadOnShow = prop.loadOnShow,
|
|
77
|
+
loadOnShow = _prop$loadOnShow === void 0 ? false : _prop$loadOnShow,
|
|
76
78
|
_prop$triggerCheck = prop.triggerCheck,
|
|
77
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,
|
|
78
84
|
rest = _objectWithoutProperties(prop, _excluded); //显示输入框绑定的name,如果不设置textName,设置为$name__text
|
|
79
85
|
|
|
80
86
|
|
|
@@ -324,7 +330,7 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
324
330
|
}
|
|
325
331
|
}, "\u786E\u8BA4")];
|
|
326
332
|
},
|
|
327
|
-
headerTitle: "\u53CC\u51FB\
|
|
333
|
+
headerTitle: "\u53CC\u51FB\u9009\u4E2D\u5F53\u524D\u884C\u6570\u636E"
|
|
328
334
|
}, tableConfig));
|
|
329
335
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
330
336
|
style: {
|
|
@@ -343,10 +349,11 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
343
349
|
maxHeight: '95vh',
|
|
344
350
|
overflow: 'auto'
|
|
345
351
|
}
|
|
346
|
-
}, tableDom),
|
|
352
|
+
}, loadOnShow ? visible ? tableDom : null : tableDom),
|
|
347
353
|
trigger: "click",
|
|
348
354
|
visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
|
|
349
|
-
onVisibleChange: setVisible
|
|
355
|
+
onVisibleChange: setVisible,
|
|
356
|
+
getPopupContainer: getPopupContainer
|
|
350
357
|
}, /*#__PURE__*/React.createElement(MoreOutlined, {
|
|
351
358
|
onClick: function onClick(e) {
|
|
352
359
|
setVisible(true);
|
|
@@ -380,10 +387,11 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
380
387
|
maxHeight: '95vh',
|
|
381
388
|
overflow: 'auto'
|
|
382
389
|
}
|
|
383
|
-
}, tableDom),
|
|
390
|
+
}, loadOnShow ? visible ? tableDom : null : tableDom),
|
|
384
391
|
trigger: "click",
|
|
385
392
|
visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
|
|
386
|
-
onVisibleChange: setVisible
|
|
393
|
+
onVisibleChange: setVisible,
|
|
394
|
+
getPopupContainer: getPopupContainer
|
|
387
395
|
}, /*#__PURE__*/React.createElement(MoreOutlined, {
|
|
388
396
|
onClick: function onClick(e) {
|
|
389
397
|
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,19 +135,27 @@ 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
|
+
|
|
155
|
+
a {
|
|
156
|
+
color: var(--ant-primary-color);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
a:hover {
|
|
160
|
+
color: var(--ant-primary-5);
|
|
161
|
+
}
|
package/es/http/index.js
CHANGED
|
@@ -26,6 +26,11 @@ request.interceptors.request.use(function (url, options) {
|
|
|
26
26
|
resCode: getUrlQuery('resCode') || getUrlQuery('resourceId') || getResourceProps('resourceId'),
|
|
27
27
|
_t1: Date.now()
|
|
28
28
|
};
|
|
29
|
+
|
|
30
|
+
if (!param.resCode) {
|
|
31
|
+
delete param.resCode;
|
|
32
|
+
}
|
|
33
|
+
|
|
29
34
|
return {
|
|
30
35
|
url: setUrlQuery(url, param),
|
|
31
36
|
options: opts
|
|
@@ -35,36 +40,51 @@ request.interceptors.request.use(function (url, options) {
|
|
|
35
40
|
|
|
36
41
|
request.interceptors.response.use( /*#__PURE__*/function () {
|
|
37
42
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(response, options) {
|
|
38
|
-
var noMsg, _data$flag, _data$flag2,
|
|
43
|
+
var noMsg, _data$flag, data, _data$flag2, _data$flag3, _data, retCode, retMsg, status;
|
|
39
44
|
|
|
40
45
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
41
46
|
while (1) {
|
|
42
47
|
switch (_context.prev = _context.next) {
|
|
43
48
|
case 0:
|
|
44
|
-
noMsg = getUrlQuery('noMsg', options.url);
|
|
49
|
+
noMsg = getUrlQuery('noMsg', options.url); // http 状态码错误
|
|
45
50
|
|
|
46
51
|
if (!(response.status < 200 || response.status >= 300)) {
|
|
47
|
-
_context.next =
|
|
52
|
+
_context.next = 14;
|
|
48
53
|
break;
|
|
49
54
|
}
|
|
50
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);
|
|
51
69
|
showError(options.url + response.statusText);
|
|
52
|
-
|
|
70
|
+
|
|
71
|
+
case 12:
|
|
72
|
+
_context.next = 22;
|
|
53
73
|
break;
|
|
54
74
|
|
|
55
|
-
case
|
|
56
|
-
if (!(noMsg
|
|
57
|
-
_context.next =
|
|
75
|
+
case 14:
|
|
76
|
+
if (!(noMsg !== '1')) {
|
|
77
|
+
_context.next = 22;
|
|
58
78
|
break;
|
|
59
79
|
}
|
|
60
80
|
|
|
61
|
-
_context.next =
|
|
81
|
+
_context.next = 17;
|
|
62
82
|
return response.clone().json();
|
|
63
83
|
|
|
64
|
-
case
|
|
65
|
-
|
|
66
|
-
retCode = (
|
|
67
|
-
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) || '访问接口出错';
|
|
68
88
|
status = (getUrlQuery('apiStatus') || '0').split(',');
|
|
69
89
|
|
|
70
90
|
if (retCode && !status.includes(retCode)) {
|
|
@@ -75,15 +95,15 @@ request.interceptors.response.use( /*#__PURE__*/function () {
|
|
|
75
95
|
}
|
|
76
96
|
}
|
|
77
97
|
|
|
78
|
-
case
|
|
98
|
+
case 22:
|
|
79
99
|
return _context.abrupt("return", response);
|
|
80
100
|
|
|
81
|
-
case
|
|
101
|
+
case 23:
|
|
82
102
|
case "end":
|
|
83
103
|
return _context.stop();
|
|
84
104
|
}
|
|
85
105
|
}
|
|
86
|
-
}, _callee);
|
|
106
|
+
}, _callee, null, [[2, 9]]);
|
|
87
107
|
}));
|
|
88
108
|
|
|
89
109
|
return function (_x, _x2) {
|
|
@@ -34,12 +34,14 @@ export declare type InputTableProps = ProFormItemProps<InputProps> & {
|
|
|
34
34
|
fillMap?: Record<string, string>;
|
|
35
35
|
/**@name 输入后检查数据的触发方式,默认为entry回车触发 */
|
|
36
36
|
triggerCheck?: 'entry' | 'blur';
|
|
37
|
+
loadOnShow?: boolean;
|
|
37
38
|
/**@name 选择行事件 */
|
|
38
39
|
onSelectChange?: (item: any, formRef?: any) => void;
|
|
39
40
|
/**@name 加载之前事件,param为查询条件对象,可以通过此方法调整 */
|
|
40
41
|
beforeLoad?: (param: any) => void;
|
|
41
42
|
/**@name 加载之后事件,row为接口返回数据,可以通过此方法调整 */
|
|
42
43
|
afterLoad?: (rows: any[]) => void;
|
|
44
|
+
getPopupContainer?: (triggerNode: any) => HTMLElement;
|
|
43
45
|
};
|
|
44
46
|
declare const InputTable: React.ForwardRefExoticComponent<{
|
|
45
47
|
fieldProps?: (import("../../../form/lib/interface").FieldProps & InputProps) | undefined;
|
|
@@ -83,11 +85,13 @@ declare const InputTable: React.ForwardRefExoticComponent<{
|
|
|
83
85
|
fillMap?: Record<string, string> | undefined;
|
|
84
86
|
/**@name 输入后检查数据的触发方式,默认为entry回车触发 */
|
|
85
87
|
triggerCheck?: "entry" | "blur" | undefined;
|
|
88
|
+
loadOnShow?: boolean | undefined;
|
|
86
89
|
/**@name 选择行事件 */
|
|
87
90
|
onSelectChange?: ((item: any, formRef?: any) => void) | undefined;
|
|
88
91
|
/**@name 加载之前事件,param为查询条件对象,可以通过此方法调整 */
|
|
89
92
|
beforeLoad?: ((param: any) => void) | undefined;
|
|
90
93
|
/**@name 加载之后事件,row为接口返回数据,可以通过此方法调整 */
|
|
91
94
|
afterLoad?: ((rows: any[]) => void) | undefined;
|
|
95
|
+
getPopupContainer?: ((triggerNode: any) => HTMLElement) | undefined;
|
|
92
96
|
} & React.RefAttributes<unknown>>;
|
|
93
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", "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) {
|
|
@@ -102,8 +102,14 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
|
|
|
102
102
|
fieldProps = prop.fieldProps,
|
|
103
103
|
searchField = prop.searchField,
|
|
104
104
|
fillMap = prop.fillMap,
|
|
105
|
+
_prop$loadOnShow = prop.loadOnShow,
|
|
106
|
+
loadOnShow = _prop$loadOnShow === void 0 ? false : _prop$loadOnShow,
|
|
105
107
|
_prop$triggerCheck = prop.triggerCheck,
|
|
106
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,
|
|
107
113
|
rest = (0, _objectWithoutProperties2.default)(prop, _excluded); //显示输入框绑定的name,如果不设置textName,设置为$name__text
|
|
108
114
|
|
|
109
115
|
var textNameProp = (0, _react.useMemo)(function () {
|
|
@@ -352,7 +358,7 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
|
|
|
352
358
|
}
|
|
353
359
|
}, "\u786E\u8BA4")];
|
|
354
360
|
},
|
|
355
|
-
headerTitle: "\u53CC\u51FB\
|
|
361
|
+
headerTitle: "\u53CC\u51FB\u9009\u4E2D\u5F53\u524D\u884C\u6570\u636E"
|
|
356
362
|
}, tableConfig));
|
|
357
363
|
|
|
358
364
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -372,10 +378,11 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
|
|
|
372
378
|
maxHeight: '95vh',
|
|
373
379
|
overflow: 'auto'
|
|
374
380
|
}
|
|
375
|
-
}, tableDom),
|
|
381
|
+
}, loadOnShow ? visible ? tableDom : null : tableDom),
|
|
376
382
|
trigger: "click",
|
|
377
383
|
visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
|
|
378
|
-
onVisibleChange: setVisible
|
|
384
|
+
onVisibleChange: setVisible,
|
|
385
|
+
getPopupContainer: getPopupContainer
|
|
379
386
|
}, /*#__PURE__*/_react.default.createElement(_icons.MoreOutlined, {
|
|
380
387
|
onClick: function onClick(e) {
|
|
381
388
|
setVisible(true);
|
|
@@ -409,10 +416,11 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
|
|
|
409
416
|
maxHeight: '95vh',
|
|
410
417
|
overflow: 'auto'
|
|
411
418
|
}
|
|
412
|
-
}, tableDom),
|
|
419
|
+
}, loadOnShow ? visible ? tableDom : null : tableDom),
|
|
413
420
|
trigger: "click",
|
|
414
421
|
visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
|
|
415
|
-
onVisibleChange: setVisible
|
|
422
|
+
onVisibleChange: setVisible,
|
|
423
|
+
getPopupContainer: getPopupContainer
|
|
416
424
|
}, /*#__PURE__*/_react.default.createElement(_icons.MoreOutlined, {
|
|
417
425
|
onClick: function onClick(e) {
|
|
418
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,19 +135,27 @@ 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
|
+
|
|
155
|
+
a {
|
|
156
|
+
color: var(--ant-primary-color);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
a:hover {
|
|
160
|
+
color: var(--ant-primary-5);
|
|
161
|
+
}
|
package/lib/http/index.js
CHANGED
|
@@ -45,6 +45,11 @@ request.interceptors.request.use(function (url, options) {
|
|
|
45
45
|
resCode: (0, _utils.getUrlQuery)('resCode') || (0, _utils.getUrlQuery)('resourceId') || (0, _utils.getResourceProps)('resourceId'),
|
|
46
46
|
_t1: Date.now()
|
|
47
47
|
};
|
|
48
|
+
|
|
49
|
+
if (!param.resCode) {
|
|
50
|
+
delete param.resCode;
|
|
51
|
+
}
|
|
52
|
+
|
|
48
53
|
return {
|
|
49
54
|
url: (0, _utils.setUrlQuery)(url, param),
|
|
50
55
|
options: opts
|
|
@@ -54,36 +59,51 @@ request.interceptors.request.use(function (url, options) {
|
|
|
54
59
|
|
|
55
60
|
request.interceptors.response.use( /*#__PURE__*/function () {
|
|
56
61
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(response, options) {
|
|
57
|
-
var noMsg, _data$flag, _data$flag2,
|
|
62
|
+
var noMsg, _data$flag, data, _data$flag2, _data$flag3, _data, retCode, retMsg, status;
|
|
58
63
|
|
|
59
64
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
60
65
|
while (1) {
|
|
61
66
|
switch (_context.prev = _context.next) {
|
|
62
67
|
case 0:
|
|
63
|
-
noMsg = (0, _utils.getUrlQuery)('noMsg', options.url);
|
|
68
|
+
noMsg = (0, _utils.getUrlQuery)('noMsg', options.url); // http 状态码错误
|
|
64
69
|
|
|
65
70
|
if (!(response.status < 200 || response.status >= 300)) {
|
|
66
|
-
_context.next =
|
|
71
|
+
_context.next = 14;
|
|
67
72
|
break;
|
|
68
73
|
}
|
|
69
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);
|
|
70
88
|
(0, _utils.showError)(options.url + response.statusText);
|
|
71
|
-
|
|
89
|
+
|
|
90
|
+
case 12:
|
|
91
|
+
_context.next = 22;
|
|
72
92
|
break;
|
|
73
93
|
|
|
74
|
-
case
|
|
75
|
-
if (!(noMsg
|
|
76
|
-
_context.next =
|
|
94
|
+
case 14:
|
|
95
|
+
if (!(noMsg !== '1')) {
|
|
96
|
+
_context.next = 22;
|
|
77
97
|
break;
|
|
78
98
|
}
|
|
79
99
|
|
|
80
|
-
_context.next =
|
|
100
|
+
_context.next = 17;
|
|
81
101
|
return response.clone().json();
|
|
82
102
|
|
|
83
|
-
case
|
|
84
|
-
|
|
85
|
-
retCode = (
|
|
86
|
-
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) || '访问接口出错';
|
|
87
107
|
status = ((0, _utils.getUrlQuery)('apiStatus') || '0').split(',');
|
|
88
108
|
|
|
89
109
|
if (retCode && !status.includes(retCode)) {
|
|
@@ -94,15 +114,15 @@ request.interceptors.response.use( /*#__PURE__*/function () {
|
|
|
94
114
|
}
|
|
95
115
|
}
|
|
96
116
|
|
|
97
|
-
case
|
|
117
|
+
case 22:
|
|
98
118
|
return _context.abrupt("return", response);
|
|
99
119
|
|
|
100
|
-
case
|
|
120
|
+
case 23:
|
|
101
121
|
case "end":
|
|
102
122
|
return _context.stop();
|
|
103
123
|
}
|
|
104
124
|
}
|
|
105
|
-
}, _callee);
|
|
125
|
+
}, _callee, null, [[2, 9]]);
|
|
106
126
|
}));
|
|
107
127
|
|
|
108
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",
|