ls-pro-common 1.0.87 → 1.0.89
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 +6 -3
- package/dist/common.js +1 -1
- package/dist/common.min.css +6 -3
- package/dist/common.min.js +1 -1
- package/es/components/DescritionCard.js +1 -0
- package/es/components/InputMultiLine.d.ts +3 -0
- package/es/components/InputMultiLine.js +7 -4
- package/es/components/InputTable.js +19 -16
- package/es/components/Loading.d.ts +1 -0
- package/es/components/Loading.js +17 -4
- package/es/components/common.less +8 -3
- package/es/http/index.js +4 -1
- package/es/utils/index.js +7 -6
- package/lib/components/DescritionCard.js +1 -0
- package/lib/components/InputMultiLine.d.ts +3 -0
- package/lib/components/InputMultiLine.js +8 -5
- package/lib/components/InputTable.js +19 -16
- package/lib/components/Loading.d.ts +1 -0
- package/lib/components/Loading.js +19 -4
- package/lib/components/common.less +8 -3
- package/lib/http/index.js +4 -1
- package/lib/utils/index.js +7 -6
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { InputProps } from 'antd';
|
|
3
|
+
import type { TextAreaProps } from 'antd/lib/input';
|
|
3
4
|
import type { ProFormItemProps } from 'ls-pro-form';
|
|
4
5
|
export declare type InputMultiLineProps = ProFormItemProps<InputProps> & {
|
|
5
6
|
/**@name 表单项name, 跟 form.item 的 name一致 */
|
|
@@ -15,6 +16,7 @@ export declare type InputMultiLineProps = ProFormItemProps<InputProps> & {
|
|
|
15
16
|
/** @name 最大输入行数 */
|
|
16
17
|
maxRows?: number;
|
|
17
18
|
getPopupContainer?: (triggerNode: any) => HTMLElement;
|
|
19
|
+
textAreaProps?: TextAreaProps;
|
|
18
20
|
};
|
|
19
21
|
declare const InputMultiLine: React.ForwardRefExoticComponent<{
|
|
20
22
|
fieldProps?: (import("../../../form/lib/interface").FieldProps & InputProps) | undefined;
|
|
@@ -39,5 +41,6 @@ declare const InputMultiLine: React.ForwardRefExoticComponent<{
|
|
|
39
41
|
/** @name 最大输入行数 */
|
|
40
42
|
maxRows?: number | undefined;
|
|
41
43
|
getPopupContainer?: ((triggerNode: any) => HTMLElement) | undefined;
|
|
44
|
+
textAreaProps?: TextAreaProps | undefined;
|
|
42
45
|
} & React.RefAttributes<unknown>>;
|
|
43
46
|
export default InputMultiLine;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import "antd/es/popover/style";
|
|
3
2
|
import _Popover from "antd/es/popover";
|
|
4
3
|
import "antd/es/input/style";
|
|
5
4
|
import _Input from "antd/es/input";
|
|
5
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
6
6
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
7
7
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
8
8
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
9
|
-
var _excluded = ["name", "rows", "maxRows", "placement", "popWidth", "fieldProps", "defaultValue", "allowClear", "getPopupContainer"];
|
|
9
|
+
var _excluded = ["name", "rows", "maxRows", "placement", "popWidth", "fieldProps", "defaultValue", "allowClear", "getPopupContainer", "textAreaProps"];
|
|
10
10
|
import React, { useRef, useState, useEffect, useContext, useMemo, useImperativeHandle } from 'react';
|
|
11
11
|
import { ProFormText, ProFormContext } from 'ls-pro-form';
|
|
12
12
|
import { UnorderedListOutlined } from '@ant-design/icons';
|
|
@@ -52,6 +52,7 @@ var InputMultiLine = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
52
52
|
getPopupContainer = _prop$getPopupContain === void 0 ? function (triggerNode) {
|
|
53
53
|
return triggerNode.parentNode.parentNode.parentNode.parentNode;
|
|
54
54
|
} : _prop$getPopupContain,
|
|
55
|
+
textAreaProps = prop.textAreaProps,
|
|
55
56
|
rest = _objectWithoutProperties(prop, _excluded); // 设置初始值
|
|
56
57
|
|
|
57
58
|
|
|
@@ -106,14 +107,16 @@ var InputMultiLine = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
106
107
|
style: {
|
|
107
108
|
width: popWidth
|
|
108
109
|
}
|
|
109
|
-
}, /*#__PURE__*/React.createElement(_Input.TextArea, {
|
|
110
|
+
}, /*#__PURE__*/React.createElement(_Input.TextArea, _extends({
|
|
111
|
+
placeholder: "\u8BF7\u8F93\u5165"
|
|
112
|
+
}, textAreaProps, {
|
|
110
113
|
rows: rows,
|
|
111
114
|
value: lineText,
|
|
112
115
|
onInput: lineInput,
|
|
113
116
|
onKeyPress: function onKeyPress(e) {
|
|
114
117
|
if (e.key === 'Enter') e.stopPropagation();
|
|
115
118
|
}
|
|
116
|
-
})),
|
|
119
|
+
}))),
|
|
117
120
|
trigger: "click",
|
|
118
121
|
visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
|
|
119
122
|
onVisibleChange: setVisible,
|
|
@@ -176,25 +176,28 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
176
176
|
return function loadData(_x) {
|
|
177
177
|
return _ref.apply(this, arguments);
|
|
178
178
|
};
|
|
179
|
-
}();
|
|
179
|
+
}(); // 初始化数据
|
|
180
|
+
|
|
180
181
|
|
|
181
182
|
useEffect(function () {
|
|
182
|
-
|
|
183
|
+
setTimeout(function () {
|
|
184
|
+
var _formRef$current, _formRef$current2;
|
|
183
185
|
|
|
184
|
-
|
|
186
|
+
var txt = formRef === null || formRef === void 0 ? void 0 : (_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.getFieldValue(textNameProp);
|
|
187
|
+
var val = formRef === null || formRef === void 0 ? void 0 : (_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 ? void 0 : _formRef$current2.getFieldValue(name);
|
|
185
188
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
189
|
+
if (txt) {
|
|
190
|
+
setText(txt);
|
|
191
|
+
} else if (val) {
|
|
192
|
+
setText(val);
|
|
193
|
+
}
|
|
194
|
+
}, 0);
|
|
192
195
|
}, []); // 处理返回数据
|
|
193
196
|
|
|
194
197
|
var handleValue = function handleValue(row) {
|
|
195
|
-
var _formRef$
|
|
198
|
+
var _formRef$current3, _formRef$current4;
|
|
196
199
|
|
|
197
|
-
var formValue = formRef === null || formRef === void 0 ? void 0 : (_formRef$
|
|
200
|
+
var formValue = formRef === null || formRef === void 0 ? void 0 : (_formRef$current3 = formRef.current) === null || _formRef$current3 === void 0 ? void 0 : _formRef$current3.getFieldsValue();
|
|
198
201
|
var txt; //支持多选
|
|
199
202
|
|
|
200
203
|
if (Array.isArray(row)) {
|
|
@@ -232,7 +235,7 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
232
235
|
formValue[textNameProp] = txt;
|
|
233
236
|
setText(txt);
|
|
234
237
|
setVisible(false);
|
|
235
|
-
(_formRef$
|
|
238
|
+
(_formRef$current4 = formRef.current) === null || _formRef$current4 === void 0 ? void 0 : _formRef$current4.setFieldsValue(_objectSpread({}, formValue));
|
|
236
239
|
onSelectChange === null || onSelectChange === void 0 ? void 0 : onSelectChange(row, formRef);
|
|
237
240
|
}; // 可输入时,回车或失去焦点调接口查询数据
|
|
238
241
|
|
|
@@ -266,9 +269,9 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
266
269
|
|
|
267
270
|
|
|
268
271
|
var onInput = function onInput(e) {
|
|
269
|
-
var _formRef$
|
|
272
|
+
var _formRef$current5;
|
|
270
273
|
|
|
271
|
-
var formValue = formRef === null || formRef === void 0 ? void 0 : (_formRef$
|
|
274
|
+
var formValue = formRef === null || formRef === void 0 ? void 0 : (_formRef$current5 = formRef.current) === null || _formRef$current5 === void 0 ? void 0 : _formRef$current5.getFieldsValue();
|
|
272
275
|
var val = e.target.value;
|
|
273
276
|
formValue[name] = val;
|
|
274
277
|
formValue[textNameProp] = val;
|
|
@@ -279,10 +282,10 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
279
282
|
|
|
280
283
|
var clearValue = function clearValue(e) {
|
|
281
284
|
if (!e.target.value) {
|
|
282
|
-
var _formRef$
|
|
285
|
+
var _formRef$current6;
|
|
283
286
|
|
|
284
287
|
setText('');
|
|
285
|
-
var formValue = formRef === null || formRef === void 0 ? void 0 : (_formRef$
|
|
288
|
+
var formValue = formRef === null || formRef === void 0 ? void 0 : (_formRef$current6 = formRef.current) === null || _formRef$current6 === void 0 ? void 0 : _formRef$current6.getFieldsValue();
|
|
286
289
|
formValue[name] = '';
|
|
287
290
|
formValue[textNameProp] = ''; // 不处理,其它表单自己清空
|
|
288
291
|
// if (fillMap) {
|
package/es/components/Loading.js
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import "antd/es/spin/style";
|
|
2
3
|
import _Spin from "antd/es/spin";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
var _excluded = ["Text", "className"];
|
|
3
6
|
import React from 'react';
|
|
4
7
|
import './common.less';
|
|
5
8
|
export default (function (props) {
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
var _props$Text = props.Text,
|
|
10
|
+
Text = _props$Text === void 0 ? '加载中...' : _props$Text,
|
|
11
|
+
className = props.className,
|
|
12
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
13
|
+
|
|
14
|
+
var cls = "loading";
|
|
15
|
+
|
|
16
|
+
if (className) {
|
|
17
|
+
cls += " " + className;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
21
|
+
className: cls
|
|
22
|
+
}, rest), " ", /*#__PURE__*/React.createElement(_Spin, null), Text);
|
|
10
23
|
});
|
|
@@ -304,8 +304,13 @@ a:hover {
|
|
|
304
304
|
|
|
305
305
|
|
|
306
306
|
.description-card {
|
|
307
|
+
|
|
308
|
+
.ant-pro-card-header {
|
|
309
|
+
height : 50px;
|
|
310
|
+
}
|
|
311
|
+
|
|
307
312
|
.ant-pro-card-body {
|
|
308
|
-
padding:
|
|
313
|
+
padding: 12px 24px 2px;
|
|
309
314
|
}
|
|
310
315
|
|
|
311
316
|
.ant-pro-card-header-border {
|
|
@@ -313,11 +318,11 @@ a:hover {
|
|
|
313
318
|
}
|
|
314
319
|
|
|
315
320
|
.ant-descriptions-item-label {
|
|
316
|
-
color: #
|
|
321
|
+
color: #595959;
|
|
317
322
|
}
|
|
318
323
|
|
|
319
324
|
.ant-descriptions-item-content {
|
|
320
|
-
color: #
|
|
325
|
+
color: #262626;
|
|
321
326
|
}
|
|
322
327
|
}
|
|
323
328
|
|
package/es/http/index.js
CHANGED
|
@@ -43,7 +43,7 @@ request.interceptors.request.use(function (url, options) {
|
|
|
43
43
|
options.headers['x-asm-prefer-tag'] = tag;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
url = url.replace('noToken=1', '').replace('
|
|
46
|
+
url = url.replace('&noToken=1', '').replace('noToken=1', '');
|
|
47
47
|
var param = {
|
|
48
48
|
resCode: getUrlQuery('resCode') || getUrlQuery('resourceId') || getResourceProps('resourceId'),
|
|
49
49
|
_t1: Date.now()
|
|
@@ -168,6 +168,9 @@ function ajax(url) {
|
|
|
168
168
|
|
|
169
169
|
if (loadText) {
|
|
170
170
|
showLoading(loadText);
|
|
171
|
+
url = setUrlQuery(url, {
|
|
172
|
+
_loading: ''
|
|
173
|
+
}).replace('&_loading=', '').replace('_loading=', '');
|
|
171
174
|
}
|
|
172
175
|
|
|
173
176
|
if (type === 'get') {
|
package/es/utils/index.js
CHANGED
|
@@ -238,7 +238,7 @@ export var showError = function showError(text) {
|
|
|
238
238
|
_message.error({
|
|
239
239
|
content: text,
|
|
240
240
|
getPopupContainer: function getPopupContainer(e) {
|
|
241
|
-
return getFullScreenElement();
|
|
241
|
+
return getFullScreenElement() || document.body;
|
|
242
242
|
}
|
|
243
243
|
});
|
|
244
244
|
};
|
|
@@ -248,7 +248,7 @@ export var showWarn = function showWarn(text) {
|
|
|
248
248
|
_message.warn({
|
|
249
249
|
content: text,
|
|
250
250
|
getPopupContainer: function getPopupContainer(e) {
|
|
251
|
-
return getFullScreenElement();
|
|
251
|
+
return getFullScreenElement() || document.body;
|
|
252
252
|
}
|
|
253
253
|
});
|
|
254
254
|
};
|
|
@@ -258,7 +258,7 @@ export var showSuccess = function showSuccess(text) {
|
|
|
258
258
|
_message.success({
|
|
259
259
|
content: text,
|
|
260
260
|
getPopupContainer: function getPopupContainer(e) {
|
|
261
|
-
return getFullScreenElement();
|
|
261
|
+
return getFullScreenElement() || document.body;
|
|
262
262
|
}
|
|
263
263
|
});
|
|
264
264
|
};
|
|
@@ -283,7 +283,7 @@ export var showAlert = function showAlert(text) {
|
|
|
283
283
|
_Modal[type](_objectSpread({
|
|
284
284
|
content: text,
|
|
285
285
|
title: title,
|
|
286
|
-
getContainer: getFullScreenElement(),
|
|
286
|
+
getContainer: getFullScreenElement() || document.body,
|
|
287
287
|
onOk: function onOk() {
|
|
288
288
|
resolve(true);
|
|
289
289
|
},
|
|
@@ -312,7 +312,7 @@ export var showConfirm = function showConfirm(text) {
|
|
|
312
312
|
icon: /*#__PURE__*/React.createElement(QuestionCircleOutlined, null),
|
|
313
313
|
okType: 'danger',
|
|
314
314
|
closable: true,
|
|
315
|
-
getContainer: getFullScreenElement(),
|
|
315
|
+
getContainer: getFullScreenElement() || document.body,
|
|
316
316
|
onOk: function onOk() {
|
|
317
317
|
resolve(true);
|
|
318
318
|
},
|
|
@@ -763,7 +763,8 @@ export var showLoading = function showLoading() {
|
|
|
763
763
|
ReactDOM.render( /*#__PURE__*/React.createElement(_Spin, {
|
|
764
764
|
tip: text
|
|
765
765
|
}), loadWrapper);
|
|
766
|
-
document.body
|
|
766
|
+
var pNode = getFullScreenElement() || document.body;
|
|
767
|
+
pNode.appendChild(loadWrapper);
|
|
767
768
|
};
|
|
768
769
|
export var exitLoading = function exitLoading() {
|
|
769
770
|
var loading = document.getElementById('myloading');
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { InputProps } from 'antd';
|
|
3
|
+
import type { TextAreaProps } from 'antd/lib/input';
|
|
3
4
|
import type { ProFormItemProps } from 'ls-pro-form';
|
|
4
5
|
export declare type InputMultiLineProps = ProFormItemProps<InputProps> & {
|
|
5
6
|
/**@name 表单项name, 跟 form.item 的 name一致 */
|
|
@@ -15,6 +16,7 @@ export declare type InputMultiLineProps = ProFormItemProps<InputProps> & {
|
|
|
15
16
|
/** @name 最大输入行数 */
|
|
16
17
|
maxRows?: number;
|
|
17
18
|
getPopupContainer?: (triggerNode: any) => HTMLElement;
|
|
19
|
+
textAreaProps?: TextAreaProps;
|
|
18
20
|
};
|
|
19
21
|
declare const InputMultiLine: React.ForwardRefExoticComponent<{
|
|
20
22
|
fieldProps?: (import("../../../form/lib/interface").FieldProps & InputProps) | undefined;
|
|
@@ -39,5 +41,6 @@ declare const InputMultiLine: React.ForwardRefExoticComponent<{
|
|
|
39
41
|
/** @name 最大输入行数 */
|
|
40
42
|
maxRows?: number | undefined;
|
|
41
43
|
getPopupContainer?: ((triggerNode: any) => HTMLElement) | undefined;
|
|
44
|
+
textAreaProps?: TextAreaProps | undefined;
|
|
42
45
|
} & React.RefAttributes<unknown>>;
|
|
43
46
|
export default InputMultiLine;
|
|
@@ -9,8 +9,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports.default = void 0;
|
|
11
11
|
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
12
|
require("antd/es/popover/style");
|
|
15
13
|
|
|
16
14
|
var _popover = _interopRequireDefault(require("antd/es/popover"));
|
|
@@ -19,6 +17,8 @@ require("antd/es/input/style");
|
|
|
19
17
|
|
|
20
18
|
var _input = _interopRequireDefault(require("antd/es/input"));
|
|
21
19
|
|
|
20
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
21
|
+
|
|
22
22
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
23
23
|
|
|
24
24
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
@@ -31,7 +31,7 @@ var _lsProForm = require("ls-pro-form");
|
|
|
31
31
|
|
|
32
32
|
var _icons = require("@ant-design/icons");
|
|
33
33
|
|
|
34
|
-
var _excluded = ["name", "rows", "maxRows", "placement", "popWidth", "fieldProps", "defaultValue", "allowClear", "getPopupContainer"];
|
|
34
|
+
var _excluded = ["name", "rows", "maxRows", "placement", "popWidth", "fieldProps", "defaultValue", "allowClear", "getPopupContainer", "textAreaProps"];
|
|
35
35
|
|
|
36
36
|
var InputMultiLine = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
|
|
37
37
|
//@ts-ignore
|
|
@@ -74,6 +74,7 @@ var InputMultiLine = /*#__PURE__*/_react.default.forwardRef(function (prop, ref)
|
|
|
74
74
|
getPopupContainer = _prop$getPopupContain === void 0 ? function (triggerNode) {
|
|
75
75
|
return triggerNode.parentNode.parentNode.parentNode.parentNode;
|
|
76
76
|
} : _prop$getPopupContain,
|
|
77
|
+
textAreaProps = prop.textAreaProps,
|
|
77
78
|
rest = (0, _objectWithoutProperties2.default)(prop, _excluded); // 设置初始值
|
|
78
79
|
|
|
79
80
|
(0, _react.useEffect)(function () {
|
|
@@ -127,14 +128,16 @@ var InputMultiLine = /*#__PURE__*/_react.default.forwardRef(function (prop, ref)
|
|
|
127
128
|
style: {
|
|
128
129
|
width: popWidth
|
|
129
130
|
}
|
|
130
|
-
}, /*#__PURE__*/_react.default.createElement(_input.default.TextArea, {
|
|
131
|
+
}, /*#__PURE__*/_react.default.createElement(_input.default.TextArea, (0, _extends2.default)({
|
|
132
|
+
placeholder: "\u8BF7\u8F93\u5165"
|
|
133
|
+
}, textAreaProps, {
|
|
131
134
|
rows: rows,
|
|
132
135
|
value: lineText,
|
|
133
136
|
onInput: lineInput,
|
|
134
137
|
onKeyPress: function onKeyPress(e) {
|
|
135
138
|
if (e.key === 'Enter') e.stopPropagation();
|
|
136
139
|
}
|
|
137
|
-
})),
|
|
140
|
+
}))),
|
|
138
141
|
trigger: "click",
|
|
139
142
|
visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
|
|
140
143
|
onVisibleChange: setVisible,
|
|
@@ -204,25 +204,28 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
|
|
|
204
204
|
return function loadData(_x) {
|
|
205
205
|
return _ref.apply(this, arguments);
|
|
206
206
|
};
|
|
207
|
-
}();
|
|
207
|
+
}(); // 初始化数据
|
|
208
|
+
|
|
208
209
|
|
|
209
210
|
(0, _react.useEffect)(function () {
|
|
210
|
-
|
|
211
|
+
setTimeout(function () {
|
|
212
|
+
var _formRef$current, _formRef$current2;
|
|
211
213
|
|
|
212
|
-
|
|
214
|
+
var txt = formRef === null || formRef === void 0 ? void 0 : (_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.getFieldValue(textNameProp);
|
|
215
|
+
var val = formRef === null || formRef === void 0 ? void 0 : (_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 ? void 0 : _formRef$current2.getFieldValue(name);
|
|
213
216
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
217
|
+
if (txt) {
|
|
218
|
+
setText(txt);
|
|
219
|
+
} else if (val) {
|
|
220
|
+
setText(val);
|
|
221
|
+
}
|
|
222
|
+
}, 0);
|
|
220
223
|
}, []); // 处理返回数据
|
|
221
224
|
|
|
222
225
|
var handleValue = function handleValue(row) {
|
|
223
|
-
var _formRef$
|
|
226
|
+
var _formRef$current3, _formRef$current4;
|
|
224
227
|
|
|
225
|
-
var formValue = formRef === null || formRef === void 0 ? void 0 : (_formRef$
|
|
228
|
+
var formValue = formRef === null || formRef === void 0 ? void 0 : (_formRef$current3 = formRef.current) === null || _formRef$current3 === void 0 ? void 0 : _formRef$current3.getFieldsValue();
|
|
226
229
|
var txt; //支持多选
|
|
227
230
|
|
|
228
231
|
if (Array.isArray(row)) {
|
|
@@ -260,7 +263,7 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
|
|
|
260
263
|
formValue[textNameProp] = txt;
|
|
261
264
|
setText(txt);
|
|
262
265
|
setVisible(false);
|
|
263
|
-
(_formRef$
|
|
266
|
+
(_formRef$current4 = formRef.current) === null || _formRef$current4 === void 0 ? void 0 : _formRef$current4.setFieldsValue((0, _objectSpread2.default)({}, formValue));
|
|
264
267
|
onSelectChange === null || onSelectChange === void 0 ? void 0 : onSelectChange(row, formRef);
|
|
265
268
|
}; // 可输入时,回车或失去焦点调接口查询数据
|
|
266
269
|
|
|
@@ -294,9 +297,9 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
|
|
|
294
297
|
|
|
295
298
|
|
|
296
299
|
var onInput = function onInput(e) {
|
|
297
|
-
var _formRef$
|
|
300
|
+
var _formRef$current5;
|
|
298
301
|
|
|
299
|
-
var formValue = formRef === null || formRef === void 0 ? void 0 : (_formRef$
|
|
302
|
+
var formValue = formRef === null || formRef === void 0 ? void 0 : (_formRef$current5 = formRef.current) === null || _formRef$current5 === void 0 ? void 0 : _formRef$current5.getFieldsValue();
|
|
300
303
|
var val = e.target.value;
|
|
301
304
|
formValue[name] = val;
|
|
302
305
|
formValue[textNameProp] = val;
|
|
@@ -307,10 +310,10 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
|
|
|
307
310
|
|
|
308
311
|
var clearValue = function clearValue(e) {
|
|
309
312
|
if (!e.target.value) {
|
|
310
|
-
var _formRef$
|
|
313
|
+
var _formRef$current6;
|
|
311
314
|
|
|
312
315
|
setText('');
|
|
313
|
-
var formValue = formRef === null || formRef === void 0 ? void 0 : (_formRef$
|
|
316
|
+
var formValue = formRef === null || formRef === void 0 ? void 0 : (_formRef$current6 = formRef.current) === null || _formRef$current6 === void 0 ? void 0 : _formRef$current6.getFieldsValue();
|
|
314
317
|
formValue[name] = '';
|
|
315
318
|
formValue[textNameProp] = ''; // 不处理,其它表单自己清空
|
|
316
319
|
// if (fillMap) {
|
|
@@ -7,19 +7,34 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
10
12
|
require("antd/es/spin/style");
|
|
11
13
|
|
|
12
14
|
var _spin = _interopRequireDefault(require("antd/es/spin"));
|
|
13
15
|
|
|
16
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
17
|
+
|
|
14
18
|
var _react = _interopRequireDefault(require("react"));
|
|
15
19
|
|
|
16
20
|
require("./common.less");
|
|
17
21
|
|
|
22
|
+
var _excluded = ["Text", "className"];
|
|
23
|
+
|
|
18
24
|
var _default = function _default(props) {
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
var _props$Text = props.Text,
|
|
26
|
+
Text = _props$Text === void 0 ? '加载中...' : _props$Text,
|
|
27
|
+
className = props.className,
|
|
28
|
+
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
29
|
+
var cls = "loading";
|
|
30
|
+
|
|
31
|
+
if (className) {
|
|
32
|
+
cls += " " + className;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
|
|
36
|
+
className: cls
|
|
37
|
+
}, rest), " ", /*#__PURE__*/_react.default.createElement(_spin.default, null), Text);
|
|
23
38
|
};
|
|
24
39
|
|
|
25
40
|
exports.default = _default;
|
|
@@ -304,8 +304,13 @@ a:hover {
|
|
|
304
304
|
|
|
305
305
|
|
|
306
306
|
.description-card {
|
|
307
|
+
|
|
308
|
+
.ant-pro-card-header {
|
|
309
|
+
height : 50px;
|
|
310
|
+
}
|
|
311
|
+
|
|
307
312
|
.ant-pro-card-body {
|
|
308
|
-
padding:
|
|
313
|
+
padding: 12px 24px 2px;
|
|
309
314
|
}
|
|
310
315
|
|
|
311
316
|
.ant-pro-card-header-border {
|
|
@@ -313,11 +318,11 @@ a:hover {
|
|
|
313
318
|
}
|
|
314
319
|
|
|
315
320
|
.ant-descriptions-item-label {
|
|
316
|
-
color: #
|
|
321
|
+
color: #595959;
|
|
317
322
|
}
|
|
318
323
|
|
|
319
324
|
.ant-descriptions-item-content {
|
|
320
|
-
color: #
|
|
325
|
+
color: #262626;
|
|
321
326
|
}
|
|
322
327
|
}
|
|
323
328
|
|
package/lib/http/index.js
CHANGED
|
@@ -62,7 +62,7 @@ request.interceptors.request.use(function (url, options) {
|
|
|
62
62
|
options.headers['x-asm-prefer-tag'] = tag;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
url = url.replace('noToken=1', '').replace('
|
|
65
|
+
url = url.replace('&noToken=1', '').replace('noToken=1', '');
|
|
66
66
|
var param = {
|
|
67
67
|
resCode: (0, _utils.getUrlQuery)('resCode') || (0, _utils.getUrlQuery)('resourceId') || (0, _utils.getResourceProps)('resourceId'),
|
|
68
68
|
_t1: Date.now()
|
|
@@ -187,6 +187,9 @@ function ajax(url) {
|
|
|
187
187
|
|
|
188
188
|
if (loadText) {
|
|
189
189
|
(0, _utils.showLoading)(loadText);
|
|
190
|
+
url = (0, _utils.setUrlQuery)(url, {
|
|
191
|
+
_loading: ''
|
|
192
|
+
}).replace('&_loading=', '').replace('_loading=', '');
|
|
190
193
|
}
|
|
191
194
|
|
|
192
195
|
if (type === 'get') {
|
package/lib/utils/index.js
CHANGED
|
@@ -331,7 +331,7 @@ var showError = function showError(text) {
|
|
|
331
331
|
_message2.default.error({
|
|
332
332
|
content: text,
|
|
333
333
|
getPopupContainer: function getPopupContainer(e) {
|
|
334
|
-
return getFullScreenElement();
|
|
334
|
+
return getFullScreenElement() || document.body;
|
|
335
335
|
}
|
|
336
336
|
});
|
|
337
337
|
};
|
|
@@ -344,7 +344,7 @@ var showWarn = function showWarn(text) {
|
|
|
344
344
|
_message2.default.warn({
|
|
345
345
|
content: text,
|
|
346
346
|
getPopupContainer: function getPopupContainer(e) {
|
|
347
|
-
return getFullScreenElement();
|
|
347
|
+
return getFullScreenElement() || document.body;
|
|
348
348
|
}
|
|
349
349
|
});
|
|
350
350
|
};
|
|
@@ -357,7 +357,7 @@ var showSuccess = function showSuccess(text) {
|
|
|
357
357
|
_message2.default.success({
|
|
358
358
|
content: text,
|
|
359
359
|
getPopupContainer: function getPopupContainer(e) {
|
|
360
|
-
return getFullScreenElement();
|
|
360
|
+
return getFullScreenElement() || document.body;
|
|
361
361
|
}
|
|
362
362
|
});
|
|
363
363
|
};
|
|
@@ -388,7 +388,7 @@ var showAlert = function showAlert(text) {
|
|
|
388
388
|
_modal.default[type]((0, _objectSpread2.default)({
|
|
389
389
|
content: text,
|
|
390
390
|
title: title,
|
|
391
|
-
getContainer: getFullScreenElement(),
|
|
391
|
+
getContainer: getFullScreenElement() || document.body,
|
|
392
392
|
onOk: function onOk() {
|
|
393
393
|
resolve(true);
|
|
394
394
|
},
|
|
@@ -428,7 +428,7 @@ var showConfirm = function showConfirm(text) {
|
|
|
428
428
|
icon: /*#__PURE__*/_react.default.createElement(_icons.QuestionCircleOutlined, null),
|
|
429
429
|
okType: 'danger',
|
|
430
430
|
closable: true,
|
|
431
|
-
getContainer: getFullScreenElement(),
|
|
431
|
+
getContainer: getFullScreenElement() || document.body,
|
|
432
432
|
onOk: function onOk() {
|
|
433
433
|
resolve(true);
|
|
434
434
|
},
|
|
@@ -940,7 +940,8 @@ var showLoading = function showLoading() {
|
|
|
940
940
|
tip: text
|
|
941
941
|
}), loadWrapper);
|
|
942
942
|
|
|
943
|
-
document.body
|
|
943
|
+
var pNode = getFullScreenElement() || document.body;
|
|
944
|
+
pNode.appendChild(loadWrapper);
|
|
944
945
|
};
|
|
945
946
|
|
|
946
947
|
exports.showLoading = showLoading;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ls-pro-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.89",
|
|
4
4
|
"description": "ls-pro-common",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antd",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@ant-design/icons": "^4.3.0",
|
|
30
|
-
"ls-pro-table": "2.62.
|
|
30
|
+
"ls-pro-table": "2.62.64",
|
|
31
31
|
"ls-pro-form": "1.52.34",
|
|
32
32
|
"ls-pro-descriptions":"^1.10.33",
|
|
33
33
|
"@babel/runtime": "^7.16.3",
|