@zat-design/sisyphus-react 3.4.3-beta.11 → 3.4.3-beta.13
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/index.esm.css +1 -1
- package/dist/less.esm.css +1 -1
- package/es/ProForm/components/base/TextArea/index.js +4 -4
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +2 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +116 -55
- package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +2 -2
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +1 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +0 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +0 -1
- package/es/ProTree/components/CloseIcon.d.ts +0 -1
- package/es/ProTreeModal/components/CloseIcon.d.ts +0 -1
- package/es/assets/view.svg +20 -1
- package/lib/ProForm/components/base/TextArea/index.js +5 -5
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +2 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +123 -66
- package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +2 -2
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +1 -1
- package/lib/ProForm/components/old/ProAddress/index.d.ts +0 -1
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +0 -1
- package/lib/ProTree/components/CloseIcon.d.ts +0 -1
- package/lib/ProTreeModal/components/CloseIcon.d.ts +0 -1
- package/lib/assets/view.svg +20 -1
- package/package.json +1 -1
package/dist/index.esm.css
CHANGED
package/dist/less.esm.css
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
4
|
import "antd/es/input/style";
|
|
4
5
|
import _Input from "antd/es/input";
|
|
@@ -31,11 +32,10 @@ var TextAreaDef = function TextAreaDef(props) {
|
|
|
31
32
|
children: rest.value
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
|
-
var _className = classnames({
|
|
35
|
+
var _className = classnames(_defineProperty({
|
|
35
36
|
'pro-textarea': true,
|
|
36
|
-
'pro-textarea-view': isView
|
|
37
|
-
|
|
38
|
-
});
|
|
37
|
+
'pro-textarea-view': isView
|
|
38
|
+
}, className, true));
|
|
39
39
|
return _jsx(TextArea, _objectSpread(_objectSpread(_objectSpread({
|
|
40
40
|
showCount: true,
|
|
41
41
|
autoComplete: "off",
|
|
@@ -47,7 +47,8 @@ export function useRequestList(service, options, useRequestOptions) {
|
|
|
47
47
|
onPageChange = _useDefaultOptions.onPageChange,
|
|
48
48
|
transformParams = _useDefaultOptions.transformParams,
|
|
49
49
|
transformResponse = _useDefaultOptions.transformResponse;
|
|
50
|
-
var
|
|
50
|
+
var _ref2 = useRequestOptions || {},
|
|
51
|
+
defaultParams = _ref2.defaultParams;
|
|
51
52
|
// 搜索表单里的值
|
|
52
53
|
var _useState3 = useState(),
|
|
53
54
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import "antd/es/tooltip/style";
|
|
2
2
|
import _Tooltip from "antd/es/tooltip";
|
|
3
|
+
import "antd/es/button/style";
|
|
4
|
+
import _Button from "antd/es/button";
|
|
3
5
|
import "antd/es/input/style";
|
|
4
6
|
import _Input from "antd/es/input";
|
|
7
|
+
import "antd/es/space/style";
|
|
8
|
+
import _Space from "antd/es/space";
|
|
5
9
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
10
|
import "antd/es/message/style";
|
|
7
11
|
import _message from "antd/es/message";
|
|
@@ -16,12 +20,13 @@ var _excluded = ["value", "onChange", "disabled", "labelInValue", "fieldNames",
|
|
|
16
20
|
_excluded2 = ["onOk"],
|
|
17
21
|
_excluded3 = ["rowKey", "columns", "rowSelection"];
|
|
18
22
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
|
-
import {
|
|
23
|
+
import { SearchOutlined } from '@ant-design/icons';
|
|
20
24
|
import { useMount, useSetState } from 'ahooks';
|
|
21
|
-
import {
|
|
25
|
+
import { useRequest as useUmiRequest } from 'umi';
|
|
26
|
+
import { cloneDeep, debounce, isArray, isEqual, isFunction, omit } from 'lodash';
|
|
22
27
|
import { ReactSVG } from 'react-svg';
|
|
23
28
|
import React, { forwardRef, useEffect, useImperativeHandle, useMemo } from 'react';
|
|
24
|
-
import { ProForm, ProDrawerForm, ProTable, useProConfig } from '../../../../index';
|
|
29
|
+
import { ProForm, ProDrawerForm, ProTable, useProConfig, ProSelect } from '../../../../index';
|
|
25
30
|
import Container from '../../Container';
|
|
26
31
|
import viewSvg from '../../../../assets/view.svg';
|
|
27
32
|
import useRequestList from './hooks/useRequestList';
|
|
@@ -49,7 +54,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
49
54
|
isTooltip = props.isTooltip,
|
|
50
55
|
searchForm = props.searchForm,
|
|
51
56
|
defaultOne = props.defaultOne,
|
|
52
|
-
|
|
57
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
53
58
|
var contentForm = _Form.useFormInstance();
|
|
54
59
|
if (!configOption || Object.prototype.toString.call(configOption) !== '[object Object]') {
|
|
55
60
|
throw new Error('error: 请检查枚举选择弹框的配置项【configOption】');
|
|
@@ -102,6 +107,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
102
107
|
onOff: false,
|
|
103
108
|
visible: false,
|
|
104
109
|
open: false,
|
|
110
|
+
options: (tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource) || [],
|
|
105
111
|
selectedRows: [],
|
|
106
112
|
selectedRowKeys: []
|
|
107
113
|
}),
|
|
@@ -112,6 +118,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
112
118
|
onOff = _useSetState2$.onOff,
|
|
113
119
|
visible = _useSetState2$.visible,
|
|
114
120
|
open = _useSetState2$.open,
|
|
121
|
+
options = _useSetState2$.options,
|
|
115
122
|
_selectedRows = _useSetState2$.selectedRows,
|
|
116
123
|
_selectedRowKeys = _useSetState2$.selectedRowKeys,
|
|
117
124
|
setState = _useSetState2[1];
|
|
@@ -120,13 +127,23 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
120
127
|
form = _Form$useForm2[0];
|
|
121
128
|
var selectedRows = (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) || _selectedRows;
|
|
122
129
|
var selectedRowKeys = (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || _selectedRowKeys;
|
|
130
|
+
var _useUmiRequest = useUmiRequest(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, _objectSpread(_objectSpread({}, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options), {}, {
|
|
131
|
+
manual: true,
|
|
132
|
+
onSuccess: function onSuccess(data) {
|
|
133
|
+
var list = withPagination ? data === null || data === void 0 ? void 0 : data.list : data;
|
|
134
|
+
setState({
|
|
135
|
+
options: list
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
})),
|
|
139
|
+
run = _useUmiRequest.run;
|
|
123
140
|
var _useRequestList = useRequestList(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, {
|
|
124
141
|
withPagination: withPagination,
|
|
125
142
|
transformParams: transformParams,
|
|
126
143
|
transformResponse: transformResponse
|
|
127
144
|
}, _objectSpread({
|
|
128
145
|
manual: true,
|
|
129
|
-
ready: (useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams) ||
|
|
146
|
+
ready: ((useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams) || defaultOne) && !readOnly || visible
|
|
130
147
|
}, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options)),
|
|
131
148
|
data = _useRequestList.data,
|
|
132
149
|
loading = _useRequestList.loading,
|
|
@@ -207,6 +224,9 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
207
224
|
});
|
|
208
225
|
}
|
|
209
226
|
};
|
|
227
|
+
var handleSelectValue = function handleSelectValue(val, option) {
|
|
228
|
+
onChange(val, option);
|
|
229
|
+
};
|
|
210
230
|
// 清空表单项
|
|
211
231
|
var handleClearValue = function handleClearValue() {
|
|
212
232
|
onChange(undefined, {});
|
|
@@ -317,7 +337,8 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
317
337
|
onChange === null || onChange === void 0 ? void 0 : onChange(labelInValue ? _data : getNextValues(_data), _data);
|
|
318
338
|
// 更新内部展示值
|
|
319
339
|
setState({
|
|
320
|
-
_value: _data
|
|
340
|
+
_value: _data,
|
|
341
|
+
options: isArray(_data) ? _data : [_data]
|
|
321
342
|
});
|
|
322
343
|
handleClose();
|
|
323
344
|
}
|
|
@@ -586,9 +607,30 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
586
607
|
}, [onOff, visible, value]);
|
|
587
608
|
useEffect(function () {
|
|
588
609
|
if (value && !visible && isInit) {
|
|
589
|
-
|
|
610
|
+
if (readOnly) {
|
|
611
|
+
// 加定时器 修复依赖数据同步更新未取到问题
|
|
612
|
+
setTimeout(function () {
|
|
613
|
+
var _useRequest$options7, _useRequest$options8;
|
|
614
|
+
var initParams = useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams;
|
|
615
|
+
if (typeof (useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams) === 'function') {
|
|
616
|
+
var _contentForm$getField2;
|
|
617
|
+
initParams = useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams(value, contentForm === null || contentForm === void 0 ? void 0 : (_contentForm$getField2 = contentForm.getFieldsValue) === null || _contentForm$getField2 === void 0 ? void 0 : _contentForm$getField2.call(contentForm));
|
|
618
|
+
}
|
|
619
|
+
var params = withPagination ? {
|
|
620
|
+
pageNum: 1,
|
|
621
|
+
pageSize: 50,
|
|
622
|
+
queryBean: _objectSpread(_objectSpread({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options7 = useRequest.options) === null || _useRequest$options7 === void 0 ? void 0 : _useRequest$options7.defaultParams), initParams)
|
|
623
|
+
} : _objectSpread(_objectSpread({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options8 = useRequest.options) === null || _useRequest$options8 === void 0 ? void 0 : _useRequest$options8.defaultParams), initParams);
|
|
624
|
+
run(params);
|
|
625
|
+
setState({
|
|
626
|
+
isInit: false
|
|
627
|
+
});
|
|
628
|
+
}, 0);
|
|
629
|
+
} else {
|
|
630
|
+
getInitValues();
|
|
631
|
+
}
|
|
590
632
|
}
|
|
591
|
-
}, [value, visible, isInit]);
|
|
633
|
+
}, [value, visible, isInit, useRequest]);
|
|
592
634
|
useEffect(function () {
|
|
593
635
|
if (!value) {
|
|
594
636
|
if (defaultOne) {
|
|
@@ -601,59 +643,78 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
601
643
|
});
|
|
602
644
|
}
|
|
603
645
|
}
|
|
604
|
-
if (
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
646
|
+
if (!readOnly) {
|
|
647
|
+
if (labelInValue && _value && !isEqual(value, _value)) {
|
|
648
|
+
setState({
|
|
649
|
+
_value: value,
|
|
650
|
+
selectedRowKeys: [],
|
|
651
|
+
selectedRows: []
|
|
652
|
+
});
|
|
653
|
+
}
|
|
654
|
+
if (!labelInValue && (_value === null || _value === void 0 ? void 0 : _value[valueKey]) && !isEqual(value, _value === null || _value === void 0 ? void 0 : _value[valueKey])) {
|
|
655
|
+
setState({
|
|
656
|
+
_value: value,
|
|
657
|
+
selectedRowKeys: [],
|
|
658
|
+
selectedRows: []
|
|
659
|
+
});
|
|
660
|
+
}
|
|
617
661
|
}
|
|
618
662
|
}, [value, _value]);
|
|
619
|
-
var defaultAddonAfter = _jsxs("div", {
|
|
620
|
-
className: "pro-enum-input-addonAfter",
|
|
621
|
-
children: [value && !disabled && _jsx("span", {
|
|
622
|
-
className: "close-icon",
|
|
623
|
-
children: _jsx(CloseOutlined, {
|
|
624
|
-
onClick: handleClearValue
|
|
625
|
-
})
|
|
626
|
-
}), _jsx(ReactSVG, {
|
|
627
|
-
className: "viewSvg",
|
|
628
|
-
src: viewSvg,
|
|
629
|
-
onClick: handleClick
|
|
630
|
-
})]
|
|
631
|
-
});
|
|
632
|
-
var forceAddonAfterRender = function forceAddonAfterRender() {
|
|
633
|
-
if (isView || disabled) {
|
|
634
|
-
return;
|
|
635
|
-
}
|
|
636
|
-
if (addonAfter) {
|
|
637
|
-
return _jsx("div", {
|
|
638
|
-
onClick: handleClick,
|
|
639
|
-
children: addonAfter
|
|
640
|
-
});
|
|
641
|
-
}
|
|
642
|
-
return defaultAddonAfter;
|
|
643
|
-
};
|
|
644
663
|
// 加个中间状态Input
|
|
645
|
-
var initRender = _jsxs(
|
|
646
|
-
|
|
664
|
+
var initRender = _jsxs(_Space.Compact, {
|
|
665
|
+
style: {
|
|
666
|
+
width: '100%'
|
|
667
|
+
},
|
|
668
|
+
block: true,
|
|
669
|
+
children: [readOnly ? _jsx(ProSelect, _objectSpread({
|
|
670
|
+
value: value,
|
|
671
|
+
onChange: handleSelectValue,
|
|
672
|
+
disabled: disabled,
|
|
673
|
+
fieldNames: fieldNames,
|
|
674
|
+
showCodeName: showCodeName,
|
|
675
|
+
labelInValue: labelInValue,
|
|
676
|
+
dataSource: options,
|
|
677
|
+
onClick: function onClick() {
|
|
678
|
+
// 没有值的时候,初始化点击默认查询前五十条
|
|
679
|
+
if (!value && isInit) {
|
|
680
|
+
var _useRequest$options9;
|
|
681
|
+
var queryBean = useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options9 = useRequest.options) === null || _useRequest$options9 === void 0 ? void 0 : _useRequest$options9.defaultParams;
|
|
682
|
+
var params = withPagination ? {
|
|
683
|
+
pageNum: 1,
|
|
684
|
+
pageSize: 50,
|
|
685
|
+
queryBean: queryBean
|
|
686
|
+
} : queryBean;
|
|
687
|
+
run(params);
|
|
688
|
+
setState({
|
|
689
|
+
isInit: false
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
},
|
|
693
|
+
onSearch: debounce(function (val) {
|
|
694
|
+
var _useRequest$options10;
|
|
695
|
+
var queryBean = _objectSpread(_objectSpread({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options10 = useRequest.options) === null || _useRequest$options10 === void 0 ? void 0 : _useRequest$options10.defaultParams), {}, _defineProperty({}, labelKey, val));
|
|
696
|
+
var params = withPagination ? {
|
|
697
|
+
pageNum: 1,
|
|
698
|
+
pageSize: 50,
|
|
699
|
+
queryBean: queryBean
|
|
700
|
+
} : queryBean;
|
|
701
|
+
run(params);
|
|
702
|
+
}, 800),
|
|
703
|
+
style: {
|
|
704
|
+
width: isView || disabled ? '100%' : 'calc(100% - 30px)'
|
|
705
|
+
}
|
|
706
|
+
}, omit(restProps, ['otherProps']))) : _jsx(_Input, _objectSpread({
|
|
647
707
|
value: viewText,
|
|
648
|
-
readOnly: readOnly,
|
|
649
|
-
onClick: readOnly ? handleClick : undefined,
|
|
650
708
|
onChange: handleChangeValue,
|
|
651
709
|
disabled: disabled,
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
}, omit(
|
|
655
|
-
|
|
656
|
-
|
|
710
|
+
autoComplete: "off",
|
|
711
|
+
allowClear: true
|
|
712
|
+
}, omit(restProps, ['otherProps']))), isView || disabled ? null : _jsx(_Button, {
|
|
713
|
+
icon: _jsx(ReactSVG, {
|
|
714
|
+
className: "viewSvg",
|
|
715
|
+
src: viewSvg,
|
|
716
|
+
onClick: handleClick
|
|
717
|
+
})
|
|
657
718
|
})]
|
|
658
719
|
});
|
|
659
720
|
if (customRender && /*#__PURE__*/React.isValidElement(customRender)) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormInstance, InputProps, ModalProps } from 'antd';
|
|
1
|
+
import { FormInstance, InputProps, SelectProps, ModalProps } from 'antd';
|
|
2
2
|
import { Service, Options } from 'ahooks/lib/useRequest/src/types';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { ProColumnProps } from '../../render/propsType';
|
|
@@ -43,5 +43,5 @@ interface ProModalPropsType {
|
|
|
43
43
|
showCodeName?: boolean;
|
|
44
44
|
searchForm?: FormInstance;
|
|
45
45
|
}
|
|
46
|
-
export declare type ProModalSelectPropsType = InputProps & ProModalPropsType;
|
|
46
|
+
export declare type ProModalSelectPropsType = SelectProps & InputProps & ProModalPropsType;
|
|
47
47
|
export {};
|
package/es/assets/view.svg
CHANGED
|
@@ -1 +1,20 @@
|
|
|
1
|
-
<?xml version="1.0"
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="19px" height="15px" viewBox="0 0 19 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>icon-dropdown-searchlist</title>
|
|
4
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="询报价录入交互说明" transform="translate(-531, -308)" fill="#999999" fill-rule="nonzero">
|
|
6
|
+
<g id="Dropdown/下拉弹窗切换/default备份-2" transform="translate(215, 299)">
|
|
7
|
+
<g id="编组-2" transform="translate(288, 1)">
|
|
8
|
+
<g id="编组" transform="translate(22, 0)">
|
|
9
|
+
<g id="icon-dropdown-searchlist" transform="translate(6, 8)">
|
|
10
|
+
<path d="M18.8595156,13.853235 L15.9118005,9.83277831 C16.9574103,8.79234063 17.6131433,7.33016175 17.6131433,5.70884872 C17.6131433,2.56113225 15.1539732,0 12.1315716,0 C9.10917008,0 6.65,2.56113225 6.65,5.70884872 C6.65,8.85656518 9.10917008,11.4176974 12.1315716,11.4176974 C13.1052358,11.4176974 14.0179175,11.1493815 14.811375,10.6841104 L17.7693681,14.7188392 C17.9043518,14.9029496 18.1078551,15 18.3147844,15 C18.4593609,15 18.6059929,14.952902 18.7293283,14.8537108 C19.0314999,14.6139391 19.0890564,14.1657945 18.8595156,13.853235 Z M8.02107811,5.70813511 C8.02107811,3.34681256 9.86494177,1.42649857 12.1322568,1.42649857 C14.3995719,1.42649857 16.2434356,3.34681256 16.2434356,5.70813511 C16.2434356,8.06945766 14.3995719,9.98977165 12.1322568,9.98977165 C9.86494177,9.98977165 8.02107811,8.06945766 8.02107811,5.70813511 Z" id="形状"></path>
|
|
11
|
+
<path d="M4.9875,2.34375 L0.7125,2.34375 C0.3192,2.34375 0,2.02875 0,1.640625 C0,1.2525 0.3192,0.9375 0.7125,0.9375 L4.9875,0.9375 C5.3808,0.9375 5.7,1.2525 5.7,1.640625 C5.7,2.02875 5.3808,2.34375 4.9875,2.34375 Z" id="路径"></path>
|
|
12
|
+
<path d="M3.95833333,7.96875 L0.791666667,7.96875 C0.354666667,7.96875 0,7.65445313 0,7.265625 C0,6.8775 0.354666667,6.5625 0.791666667,6.5625 L3.95833333,6.5625 C4.39533333,6.5625 4.75,6.8775 4.75,7.265625 C4.75,7.65445313 4.39533333,7.96875 3.95833333,7.96875 Z" id="路径"></path>
|
|
13
|
+
<path d="M7.89230769,13.59375 L0.657692308,13.59375 C0.294646154,13.59375 0,13.2794531 0,12.890625 C0,12.5017969 0.294646154,12.1875 0.657692308,12.1875 L7.89230769,12.1875 C8.25535385,12.1875 8.55,12.5017969 8.55,12.890625 C8.55,13.2794531 8.25535385,13.59375 7.89230769,13.59375 Z" id="路径"></path>
|
|
14
|
+
</g>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
</g>
|
|
20
|
+
</svg>
|
|
@@ -6,11 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
var _antd = require("antd");
|
|
12
13
|
var _lodash = require("lodash");
|
|
13
|
-
var
|
|
14
|
+
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
14
15
|
var _ProConfigProvider = require("../../../../ProConfigProvider");
|
|
15
16
|
var _locale = _interopRequireDefault(require("../../../../locale"));
|
|
16
17
|
var _ProForm = _interopRequireDefault(require("../../../../ProForm"));
|
|
@@ -37,11 +38,10 @@ var TextAreaDef = function TextAreaDef(props) {
|
|
|
37
38
|
children: rest.value
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
|
-
var _className = (0,
|
|
41
|
+
var _className = (0, _classnames2.default)((0, _defineProperty2.default)({
|
|
41
42
|
'pro-textarea': true,
|
|
42
|
-
'pro-textarea-view': isView
|
|
43
|
-
|
|
44
|
-
});
|
|
43
|
+
'pro-textarea-view': isView
|
|
44
|
+
}, className, true));
|
|
45
45
|
return (0, _jsxRuntime.jsx)(TextArea, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
46
46
|
showCount: true,
|
|
47
47
|
autoComplete: "off",
|
|
@@ -56,7 +56,8 @@ function useRequestList(service, options, useRequestOptions) {
|
|
|
56
56
|
onPageChange = _useDefaultOptions.onPageChange,
|
|
57
57
|
transformParams = _useDefaultOptions.transformParams,
|
|
58
58
|
transformResponse = _useDefaultOptions.transformResponse;
|
|
59
|
-
var
|
|
59
|
+
var _ref2 = useRequestOptions || {},
|
|
60
|
+
defaultParams = _ref2.defaultParams;
|
|
60
61
|
// 搜索表单里的值
|
|
61
62
|
var _useState3 = (0, _react.useState)(),
|
|
62
63
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
@@ -9,12 +9,13 @@ exports.default = void 0;
|
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
11
11
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
12
|
-
var
|
|
12
|
+
var _objectSpread3 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
13
13
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
14
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
16
|
var _icons = require("@ant-design/icons");
|
|
17
17
|
var _ahooks = require("ahooks");
|
|
18
|
+
var _umi = require("umi");
|
|
18
19
|
var _antd = require("antd");
|
|
19
20
|
var _lodash = require("lodash");
|
|
20
21
|
var _reactSvg = require("react-svg");
|
|
@@ -50,7 +51,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
50
51
|
isTooltip = props.isTooltip,
|
|
51
52
|
searchForm = props.searchForm,
|
|
52
53
|
defaultOne = props.defaultOne,
|
|
53
|
-
|
|
54
|
+
restProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
54
55
|
var contentForm = _antd.Form.useFormInstance();
|
|
55
56
|
if (!configOption || Object.prototype.toString.call(configOption) !== '[object Object]') {
|
|
56
57
|
throw new Error('error: 请检查枚举选择弹框的配置项【configOption】');
|
|
@@ -103,6 +104,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
103
104
|
onOff: false,
|
|
104
105
|
visible: false,
|
|
105
106
|
open: false,
|
|
107
|
+
options: (tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource) || [],
|
|
106
108
|
selectedRows: [],
|
|
107
109
|
selectedRowKeys: []
|
|
108
110
|
}),
|
|
@@ -113,6 +115,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
113
115
|
onOff = _useSetState2$.onOff,
|
|
114
116
|
visible = _useSetState2$.visible,
|
|
115
117
|
open = _useSetState2$.open,
|
|
118
|
+
options = _useSetState2$.options,
|
|
116
119
|
_selectedRows = _useSetState2$.selectedRows,
|
|
117
120
|
_selectedRowKeys = _useSetState2$.selectedRowKeys,
|
|
118
121
|
setState = _useSetState2[1];
|
|
@@ -121,13 +124,23 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
121
124
|
form = _Form$useForm2[0];
|
|
122
125
|
var selectedRows = (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) || _selectedRows;
|
|
123
126
|
var selectedRowKeys = (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || _selectedRowKeys;
|
|
127
|
+
var _useUmiRequest = (0, _umi.useRequest)(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, (0, _objectSpread3.default)((0, _objectSpread3.default)({}, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options), {}, {
|
|
128
|
+
manual: true,
|
|
129
|
+
onSuccess: function onSuccess(data) {
|
|
130
|
+
var list = withPagination ? data === null || data === void 0 ? void 0 : data.list : data;
|
|
131
|
+
setState({
|
|
132
|
+
options: list
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
})),
|
|
136
|
+
run = _useUmiRequest.run;
|
|
124
137
|
var _useRequestList = (0, _useRequestList2.default)(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, {
|
|
125
138
|
withPagination: withPagination,
|
|
126
139
|
transformParams: transformParams,
|
|
127
140
|
transformResponse: transformResponse
|
|
128
|
-
}, (0,
|
|
141
|
+
}, (0, _objectSpread3.default)({
|
|
129
142
|
manual: true,
|
|
130
|
-
ready: (useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams) ||
|
|
143
|
+
ready: ((useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams) || defaultOne) && !readOnly || visible
|
|
131
144
|
}, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options)),
|
|
132
145
|
data = _useRequestList.data,
|
|
133
146
|
loading = _useRequestList.loading,
|
|
@@ -159,13 +172,13 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
159
172
|
return data;
|
|
160
173
|
}
|
|
161
174
|
if (Object.prototype.toString.call(data) === '[object Object]') {
|
|
162
|
-
return handleFormat((0,
|
|
175
|
+
return handleFormat((0, _objectSpread3.default)((0, _objectSpread3.default)({}, data), {}, {
|
|
163
176
|
value: data[valueKey],
|
|
164
177
|
label: data[labelKey]
|
|
165
178
|
}));
|
|
166
179
|
}
|
|
167
180
|
return (0, _lodash.isArray)(data) ? data === null || data === void 0 ? void 0 : (_data$map = data.map(function (item) {
|
|
168
|
-
return handleFormat((0,
|
|
181
|
+
return handleFormat((0, _objectSpread3.default)((0, _objectSpread3.default)({}, item), {}, {
|
|
169
182
|
value: item[valueKey],
|
|
170
183
|
label: item[labelKey]
|
|
171
184
|
}));
|
|
@@ -208,6 +221,9 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
208
221
|
});
|
|
209
222
|
}
|
|
210
223
|
};
|
|
224
|
+
var handleSelectValue = function handleSelectValue(val, option) {
|
|
225
|
+
onChange(val, option);
|
|
226
|
+
};
|
|
211
227
|
// 清空表单项
|
|
212
228
|
var handleClearValue = function handleClearValue() {
|
|
213
229
|
onChange(undefined, {});
|
|
@@ -318,7 +334,8 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
318
334
|
onChange === null || onChange === void 0 ? void 0 : onChange(labelInValue ? _data : getNextValues(_data), _data);
|
|
319
335
|
// 更新内部展示值
|
|
320
336
|
setState({
|
|
321
|
-
_value: _data
|
|
337
|
+
_value: _data,
|
|
338
|
+
options: (0, _lodash.isArray)(_data) ? _data : [_data]
|
|
322
339
|
});
|
|
323
340
|
handleClose();
|
|
324
341
|
}
|
|
@@ -347,7 +364,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
347
364
|
return form.validateFields();
|
|
348
365
|
case 2:
|
|
349
366
|
values = _context3.sent;
|
|
350
|
-
onSearch((0,
|
|
367
|
+
onSearch((0, _objectSpread3.default)((0, _objectSpread3.default)({}, values), {}, {
|
|
351
368
|
d: Date.now()
|
|
352
369
|
}));
|
|
353
370
|
case 4:
|
|
@@ -360,7 +377,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
360
377
|
return _ref8.apply(this, arguments);
|
|
361
378
|
};
|
|
362
379
|
}();
|
|
363
|
-
var _rowSelection = (0,
|
|
380
|
+
var _rowSelection = (0, _objectSpread3.default)({
|
|
364
381
|
type: type,
|
|
365
382
|
onChange: function onChange(rowKeys, rows) {
|
|
366
383
|
setState({
|
|
@@ -423,12 +440,12 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
423
440
|
_context4.next = 10;
|
|
424
441
|
break;
|
|
425
442
|
}
|
|
426
|
-
queryBean = (0,
|
|
427
|
-
page = (0,
|
|
443
|
+
queryBean = (0, _objectSpread3.default)((0, _objectSpread3.default)({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options2 = useRequest.options) === null || _useRequest$options2 === void 0 ? void 0 : _useRequest$options2.defaultParams), (useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams) || {});
|
|
444
|
+
page = (0, _objectSpread3.default)({
|
|
428
445
|
pageNum: 1,
|
|
429
446
|
pageSize: 10
|
|
430
447
|
}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options3 = useRequest.options) === null || _useRequest$options3 === void 0 ? void 0 : _useRequest$options3.page);
|
|
431
|
-
params = withPagination ? (0,
|
|
448
|
+
params = withPagination ? (0, _objectSpread3.default)((0, _objectSpread3.default)({}, page), {}, {
|
|
432
449
|
queryBean: queryBean !== null && queryBean !== void 0 ? queryBean : {}
|
|
433
450
|
}) : queryBean;
|
|
434
451
|
params = transformParams ? transformParams(params) : params;
|
|
@@ -482,12 +499,12 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
482
499
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee5$(_context5) {
|
|
483
500
|
while (1) switch (_context5.prev = _context5.next) {
|
|
484
501
|
case 0:
|
|
485
|
-
queryBean = (0,
|
|
486
|
-
page = (0,
|
|
502
|
+
queryBean = (0, _objectSpread3.default)({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options4 = useRequest.options) === null || _useRequest$options4 === void 0 ? void 0 : _useRequest$options4.defaultParams);
|
|
503
|
+
page = (0, _objectSpread3.default)({
|
|
487
504
|
pageNum: 1,
|
|
488
505
|
pageSize: 10
|
|
489
506
|
}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options5 = useRequest.options) === null || _useRequest$options5 === void 0 ? void 0 : _useRequest$options5.page);
|
|
490
|
-
params = withPagination ? (0,
|
|
507
|
+
params = withPagination ? (0, _objectSpread3.default)((0, _objectSpread3.default)({}, page), {}, {
|
|
491
508
|
queryBean: queryBean !== null && queryBean !== void 0 ? queryBean : {}
|
|
492
509
|
}) : queryBean;
|
|
493
510
|
params = transformParams ? transformParams(params) : params;
|
|
@@ -587,9 +604,30 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
587
604
|
}, [onOff, visible, value]);
|
|
588
605
|
(0, _react.useEffect)(function () {
|
|
589
606
|
if (value && !visible && isInit) {
|
|
590
|
-
|
|
607
|
+
if (readOnly) {
|
|
608
|
+
// 加定时器 修复依赖数据同步更新未取到问题
|
|
609
|
+
setTimeout(function () {
|
|
610
|
+
var _useRequest$options7, _useRequest$options8;
|
|
611
|
+
var initParams = useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams;
|
|
612
|
+
if (typeof (useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams) === 'function') {
|
|
613
|
+
var _contentForm$getField2;
|
|
614
|
+
initParams = useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams(value, contentForm === null || contentForm === void 0 ? void 0 : (_contentForm$getField2 = contentForm.getFieldsValue) === null || _contentForm$getField2 === void 0 ? void 0 : _contentForm$getField2.call(contentForm));
|
|
615
|
+
}
|
|
616
|
+
var params = withPagination ? {
|
|
617
|
+
pageNum: 1,
|
|
618
|
+
pageSize: 50,
|
|
619
|
+
queryBean: (0, _objectSpread3.default)((0, _objectSpread3.default)({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options7 = useRequest.options) === null || _useRequest$options7 === void 0 ? void 0 : _useRequest$options7.defaultParams), initParams)
|
|
620
|
+
} : (0, _objectSpread3.default)((0, _objectSpread3.default)({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options8 = useRequest.options) === null || _useRequest$options8 === void 0 ? void 0 : _useRequest$options8.defaultParams), initParams);
|
|
621
|
+
run(params);
|
|
622
|
+
setState({
|
|
623
|
+
isInit: false
|
|
624
|
+
});
|
|
625
|
+
}, 0);
|
|
626
|
+
} else {
|
|
627
|
+
getInitValues();
|
|
628
|
+
}
|
|
591
629
|
}
|
|
592
|
-
}, [value, visible, isInit]);
|
|
630
|
+
}, [value, visible, isInit, useRequest]);
|
|
593
631
|
(0, _react.useEffect)(function () {
|
|
594
632
|
if (!value) {
|
|
595
633
|
if (defaultOne) {
|
|
@@ -602,59 +640,78 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
602
640
|
});
|
|
603
641
|
}
|
|
604
642
|
}
|
|
605
|
-
if (
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
643
|
+
if (!readOnly) {
|
|
644
|
+
if (labelInValue && _value && !(0, _lodash.isEqual)(value, _value)) {
|
|
645
|
+
setState({
|
|
646
|
+
_value: value,
|
|
647
|
+
selectedRowKeys: [],
|
|
648
|
+
selectedRows: []
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
if (!labelInValue && (_value === null || _value === void 0 ? void 0 : _value[valueKey]) && !(0, _lodash.isEqual)(value, _value === null || _value === void 0 ? void 0 : _value[valueKey])) {
|
|
652
|
+
setState({
|
|
653
|
+
_value: value,
|
|
654
|
+
selectedRowKeys: [],
|
|
655
|
+
selectedRows: []
|
|
656
|
+
});
|
|
657
|
+
}
|
|
618
658
|
}
|
|
619
659
|
}, [value, _value]);
|
|
620
|
-
var defaultAddonAfter = (0, _jsxRuntime.jsxs)("div", {
|
|
621
|
-
className: "pro-enum-input-addonAfter",
|
|
622
|
-
children: [value && !disabled && (0, _jsxRuntime.jsx)("span", {
|
|
623
|
-
className: "close-icon",
|
|
624
|
-
children: (0, _jsxRuntime.jsx)(_icons.CloseOutlined, {
|
|
625
|
-
onClick: handleClearValue
|
|
626
|
-
})
|
|
627
|
-
}), (0, _jsxRuntime.jsx)(_reactSvg.ReactSVG, {
|
|
628
|
-
className: "viewSvg",
|
|
629
|
-
src: _view.default,
|
|
630
|
-
onClick: handleClick
|
|
631
|
-
})]
|
|
632
|
-
});
|
|
633
|
-
var forceAddonAfterRender = function forceAddonAfterRender() {
|
|
634
|
-
if (isView || disabled) {
|
|
635
|
-
return;
|
|
636
|
-
}
|
|
637
|
-
if (addonAfter) {
|
|
638
|
-
return (0, _jsxRuntime.jsx)("div", {
|
|
639
|
-
onClick: handleClick,
|
|
640
|
-
children: addonAfter
|
|
641
|
-
});
|
|
642
|
-
}
|
|
643
|
-
return defaultAddonAfter;
|
|
644
|
-
};
|
|
645
660
|
// 加个中间状态Input
|
|
646
|
-
var initRender = (0, _jsxRuntime.jsxs)(
|
|
647
|
-
|
|
661
|
+
var initRender = (0, _jsxRuntime.jsxs)(_antd.Space.Compact, {
|
|
662
|
+
style: {
|
|
663
|
+
width: '100%'
|
|
664
|
+
},
|
|
665
|
+
block: true,
|
|
666
|
+
children: [readOnly ? (0, _jsxRuntime.jsx)(_index.ProSelect, (0, _objectSpread3.default)({
|
|
667
|
+
value: value,
|
|
668
|
+
onChange: handleSelectValue,
|
|
669
|
+
disabled: disabled,
|
|
670
|
+
fieldNames: fieldNames,
|
|
671
|
+
showCodeName: showCodeName,
|
|
672
|
+
labelInValue: labelInValue,
|
|
673
|
+
dataSource: options,
|
|
674
|
+
onClick: function onClick() {
|
|
675
|
+
// 没有值的时候,初始化点击默认查询前五十条
|
|
676
|
+
if (!value && isInit) {
|
|
677
|
+
var _useRequest$options9;
|
|
678
|
+
var queryBean = useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options9 = useRequest.options) === null || _useRequest$options9 === void 0 ? void 0 : _useRequest$options9.defaultParams;
|
|
679
|
+
var params = withPagination ? {
|
|
680
|
+
pageNum: 1,
|
|
681
|
+
pageSize: 50,
|
|
682
|
+
queryBean: queryBean
|
|
683
|
+
} : queryBean;
|
|
684
|
+
run(params);
|
|
685
|
+
setState({
|
|
686
|
+
isInit: false
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
onSearch: (0, _lodash.debounce)(function (val) {
|
|
691
|
+
var _useRequest$options10;
|
|
692
|
+
var queryBean = (0, _objectSpread3.default)((0, _objectSpread3.default)({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options10 = useRequest.options) === null || _useRequest$options10 === void 0 ? void 0 : _useRequest$options10.defaultParams), {}, (0, _defineProperty2.default)({}, labelKey, val));
|
|
693
|
+
var params = withPagination ? {
|
|
694
|
+
pageNum: 1,
|
|
695
|
+
pageSize: 50,
|
|
696
|
+
queryBean: queryBean
|
|
697
|
+
} : queryBean;
|
|
698
|
+
run(params);
|
|
699
|
+
}, 800),
|
|
700
|
+
style: {
|
|
701
|
+
width: isView || disabled ? '100%' : 'calc(100% - 30px)'
|
|
702
|
+
}
|
|
703
|
+
}, (0, _lodash.omit)(restProps, ['otherProps']))) : (0, _jsxRuntime.jsx)(_antd.Input, (0, _objectSpread3.default)({
|
|
648
704
|
value: viewText,
|
|
649
|
-
readOnly: readOnly,
|
|
650
|
-
onClick: readOnly ? handleClick : undefined,
|
|
651
705
|
onChange: handleChangeValue,
|
|
652
706
|
disabled: disabled,
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
}, (0, _lodash.omit)(
|
|
656
|
-
|
|
657
|
-
|
|
707
|
+
autoComplete: "off",
|
|
708
|
+
allowClear: true
|
|
709
|
+
}, (0, _lodash.omit)(restProps, ['otherProps']))), isView || disabled ? null : (0, _jsxRuntime.jsx)(_antd.Button, {
|
|
710
|
+
icon: (0, _jsxRuntime.jsx)(_reactSvg.ReactSVG, {
|
|
711
|
+
className: "viewSvg",
|
|
712
|
+
src: _view.default,
|
|
713
|
+
onClick: handleClick
|
|
714
|
+
})
|
|
658
715
|
})]
|
|
659
716
|
});
|
|
660
717
|
if (customRender && /*#__PURE__*/_react.default.isValidElement(customRender)) {
|
|
@@ -731,7 +788,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
731
788
|
open: open,
|
|
732
789
|
title: viewText,
|
|
733
790
|
children: initRender
|
|
734
|
-
}) : initRender, (0, _jsxRuntime.jsxs)(_index.ProDrawerForm, (0,
|
|
791
|
+
}) : initRender, (0, _jsxRuntime.jsxs)(_index.ProDrawerForm, (0, _objectSpread3.default)((0, _objectSpread3.default)({
|
|
735
792
|
showType: "Modal",
|
|
736
793
|
title: title,
|
|
737
794
|
onOk: handleFinish,
|
|
@@ -745,7 +802,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
745
802
|
columns: formColumns,
|
|
746
803
|
onFinish: handleSearch,
|
|
747
804
|
footer: (formColumns === null || formColumns === void 0 ? void 0 : formColumns.length) > 1
|
|
748
|
-
}), (0, _jsxRuntime.jsx)(_index.ProTable, (0,
|
|
805
|
+
}), (0, _jsxRuntime.jsx)(_index.ProTable, (0, _objectSpread3.default)({
|
|
749
806
|
onRow: function onRow(record) {
|
|
750
807
|
return {
|
|
751
808
|
onClick: function onClick() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormInstance, InputProps, ModalProps } from 'antd';
|
|
1
|
+
import { FormInstance, InputProps, SelectProps, ModalProps } from 'antd';
|
|
2
2
|
import { Service, Options } from 'ahooks/lib/useRequest/src/types';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { ProColumnProps } from '../../render/propsType';
|
|
@@ -43,5 +43,5 @@ interface ProModalPropsType {
|
|
|
43
43
|
showCodeName?: boolean;
|
|
44
44
|
searchForm?: FormInstance;
|
|
45
45
|
}
|
|
46
|
-
export declare type ProModalSelectPropsType = InputProps & ProModalPropsType;
|
|
46
|
+
export declare type ProModalSelectPropsType = SelectProps & InputProps & ProModalPropsType;
|
|
47
47
|
export {};
|
package/lib/assets/view.svg
CHANGED
|
@@ -1 +1,20 @@
|
|
|
1
|
-
<?xml version="1.0"
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="19px" height="15px" viewBox="0 0 19 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>icon-dropdown-searchlist</title>
|
|
4
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="询报价录入交互说明" transform="translate(-531, -308)" fill="#999999" fill-rule="nonzero">
|
|
6
|
+
<g id="Dropdown/下拉弹窗切换/default备份-2" transform="translate(215, 299)">
|
|
7
|
+
<g id="编组-2" transform="translate(288, 1)">
|
|
8
|
+
<g id="编组" transform="translate(22, 0)">
|
|
9
|
+
<g id="icon-dropdown-searchlist" transform="translate(6, 8)">
|
|
10
|
+
<path d="M18.8595156,13.853235 L15.9118005,9.83277831 C16.9574103,8.79234063 17.6131433,7.33016175 17.6131433,5.70884872 C17.6131433,2.56113225 15.1539732,0 12.1315716,0 C9.10917008,0 6.65,2.56113225 6.65,5.70884872 C6.65,8.85656518 9.10917008,11.4176974 12.1315716,11.4176974 C13.1052358,11.4176974 14.0179175,11.1493815 14.811375,10.6841104 L17.7693681,14.7188392 C17.9043518,14.9029496 18.1078551,15 18.3147844,15 C18.4593609,15 18.6059929,14.952902 18.7293283,14.8537108 C19.0314999,14.6139391 19.0890564,14.1657945 18.8595156,13.853235 Z M8.02107811,5.70813511 C8.02107811,3.34681256 9.86494177,1.42649857 12.1322568,1.42649857 C14.3995719,1.42649857 16.2434356,3.34681256 16.2434356,5.70813511 C16.2434356,8.06945766 14.3995719,9.98977165 12.1322568,9.98977165 C9.86494177,9.98977165 8.02107811,8.06945766 8.02107811,5.70813511 Z" id="形状"></path>
|
|
11
|
+
<path d="M4.9875,2.34375 L0.7125,2.34375 C0.3192,2.34375 0,2.02875 0,1.640625 C0,1.2525 0.3192,0.9375 0.7125,0.9375 L4.9875,0.9375 C5.3808,0.9375 5.7,1.2525 5.7,1.640625 C5.7,2.02875 5.3808,2.34375 4.9875,2.34375 Z" id="路径"></path>
|
|
12
|
+
<path d="M3.95833333,7.96875 L0.791666667,7.96875 C0.354666667,7.96875 0,7.65445313 0,7.265625 C0,6.8775 0.354666667,6.5625 0.791666667,6.5625 L3.95833333,6.5625 C4.39533333,6.5625 4.75,6.8775 4.75,7.265625 C4.75,7.65445313 4.39533333,7.96875 3.95833333,7.96875 Z" id="路径"></path>
|
|
13
|
+
<path d="M7.89230769,13.59375 L0.657692308,13.59375 C0.294646154,13.59375 0,13.2794531 0,12.890625 C0,12.5017969 0.294646154,12.1875 0.657692308,12.1875 L7.89230769,12.1875 C8.25535385,12.1875 8.55,12.5017969 8.55,12.890625 C8.55,13.2794531 8.25535385,13.59375 7.89230769,13.59375 Z" id="路径"></path>
|
|
14
|
+
</g>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
</g>
|
|
20
|
+
</svg>
|