@cqsjjb/jjb-react-admin-component 3.0.1 → 3.0.3
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/ControlWrapper/index.js +6 -12
- package/ControlWrapper/index.less +5 -1
- package/ControlWrapper/index.mjs +6 -12
- package/SearchForm/index.d.ts +8 -0
- package/SearchForm/index.js +11 -2
- package/SearchForm/index.mjs +10 -1
- package/package.json +1 -1
package/ControlWrapper/index.js
CHANGED
|
@@ -33,8 +33,7 @@ class Input extends React.Component {
|
|
|
33
33
|
flex: 1
|
|
34
34
|
}, /*#__PURE__*/React.createElement(OriginInput, {
|
|
35
35
|
style: {
|
|
36
|
-
width: '100%'
|
|
37
|
-
borderLeft: 'none'
|
|
36
|
+
width: '100%'
|
|
38
37
|
},
|
|
39
38
|
value: this.props.value,
|
|
40
39
|
maxLength: this.props.maxLength,
|
|
@@ -72,8 +71,7 @@ class Select extends React.Component {
|
|
|
72
71
|
}, /*#__PURE__*/React.createElement(OriginSelect, {
|
|
73
72
|
mode: this.props.mode,
|
|
74
73
|
style: {
|
|
75
|
-
width: '100%'
|
|
76
|
-
borderLeft: 'none'
|
|
74
|
+
width: '100%'
|
|
77
75
|
},
|
|
78
76
|
value: this.props.value,
|
|
79
77
|
allowClear: this.props.allowClear,
|
|
@@ -111,8 +109,7 @@ class Cascader extends React.Component {
|
|
|
111
109
|
flex: 1
|
|
112
110
|
}, /*#__PURE__*/React.createElement(OriginCascader, {
|
|
113
111
|
style: {
|
|
114
|
-
width: '100%'
|
|
115
|
-
borderLeft: 'none'
|
|
112
|
+
width: '100%'
|
|
116
113
|
},
|
|
117
114
|
value: this.props.value,
|
|
118
115
|
options: this.props.options,
|
|
@@ -160,8 +157,7 @@ class RangePicker extends React.Component {
|
|
|
160
157
|
}
|
|
161
158
|
}, /*#__PURE__*/React.createElement(OriginDatePicker.RangePicker, {
|
|
162
159
|
style: {
|
|
163
|
-
width: '100%'
|
|
164
|
-
borderLeft: 'none'
|
|
160
|
+
width: '100%'
|
|
165
161
|
},
|
|
166
162
|
value: this.props.value,
|
|
167
163
|
format: this.props.format,
|
|
@@ -198,8 +194,7 @@ class DatePicker extends React.Component {
|
|
|
198
194
|
flex: 1
|
|
199
195
|
}, /*#__PURE__*/React.createElement(OriginDatePicker, {
|
|
200
196
|
style: {
|
|
201
|
-
width: '100%'
|
|
202
|
-
borderLeft: 'none'
|
|
197
|
+
width: '100%'
|
|
203
198
|
},
|
|
204
199
|
value: this.props.value,
|
|
205
200
|
format: this.props.format,
|
|
@@ -238,8 +233,7 @@ class TreeSelect extends React.Component {
|
|
|
238
233
|
showSearch: true,
|
|
239
234
|
allowClear: true,
|
|
240
235
|
style: {
|
|
241
|
-
width: '100%'
|
|
242
|
-
borderLeft: 'none'
|
|
236
|
+
width: '100%'
|
|
243
237
|
},
|
|
244
238
|
treeData: this.props.treeData,
|
|
245
239
|
fieldNames: this.props.fieldNames,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
line-height: 30px;
|
|
8
8
|
box-sizing: border-box;
|
|
9
9
|
margin-right: -1px;
|
|
10
|
-
padding: 0 8px;
|
|
10
|
+
padding: 0 2px 0 8px;
|
|
11
11
|
border-top-left-radius: 4px;
|
|
12
12
|
border-bottom-left-radius: 4px;
|
|
13
13
|
white-space: nowrap;
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
.@{com-prefix-cls}-select-selector, .@{com-prefix-cls}-picker, .@{com-prefix-cls}-input, .@{com-prefix-cls}-input-affix-wrapper {
|
|
18
18
|
border-top-left-radius: 0;
|
|
19
19
|
border-bottom-left-radius: 0;
|
|
20
|
+
border-left-color: transparent !important;
|
|
21
|
+
&:hover, &:focus, &:focus-within{
|
|
22
|
+
border-left-color: @colorPrimary !important;
|
|
23
|
+
}
|
|
20
24
|
}
|
|
21
25
|
}
|
|
22
26
|
|
package/ControlWrapper/index.mjs
CHANGED
|
@@ -60,8 +60,7 @@ class Input extends React.Component {
|
|
|
60
60
|
<Col flex={1}>
|
|
61
61
|
<OriginInput
|
|
62
62
|
style={{
|
|
63
|
-
width: '100%'
|
|
64
|
-
borderLeft: 'none'
|
|
63
|
+
width: '100%'
|
|
65
64
|
}}
|
|
66
65
|
value={this.props.value}
|
|
67
66
|
maxLength={this.props.maxLength}
|
|
@@ -117,8 +116,7 @@ class Select extends React.Component {
|
|
|
117
116
|
<OriginSelect
|
|
118
117
|
mode={this.props.mode}
|
|
119
118
|
style={{
|
|
120
|
-
width: '100%'
|
|
121
|
-
borderLeft: 'none'
|
|
119
|
+
width: '100%'
|
|
122
120
|
}}
|
|
123
121
|
value={this.props.value}
|
|
124
122
|
allowClear={this.props.allowClear}
|
|
@@ -178,8 +176,7 @@ class Cascader extends React.Component {
|
|
|
178
176
|
<Col flex={1}>
|
|
179
177
|
<OriginCascader
|
|
180
178
|
style={{
|
|
181
|
-
width: '100%'
|
|
182
|
-
borderLeft: 'none'
|
|
179
|
+
width: '100%'
|
|
183
180
|
}}
|
|
184
181
|
value={this.props.value}
|
|
185
182
|
options={this.props.options}
|
|
@@ -244,8 +241,7 @@ class RangePicker extends React.Component {
|
|
|
244
241
|
<Col style={{ flex: 1 }}>
|
|
245
242
|
<OriginDatePicker.RangePicker
|
|
246
243
|
style={{
|
|
247
|
-
width: '100%'
|
|
248
|
-
borderLeft: 'none'
|
|
244
|
+
width: '100%'
|
|
249
245
|
}}
|
|
250
246
|
value={this.props.value}
|
|
251
247
|
format={this.props.format}
|
|
@@ -301,8 +297,7 @@ class DatePicker extends React.Component {
|
|
|
301
297
|
<Col flex={1}>
|
|
302
298
|
<OriginDatePicker
|
|
303
299
|
style={{
|
|
304
|
-
width: '100%'
|
|
305
|
-
borderLeft: 'none'
|
|
300
|
+
width: '100%'
|
|
306
301
|
}}
|
|
307
302
|
value={this.props.value}
|
|
308
303
|
format={this.props.format}
|
|
@@ -359,8 +354,7 @@ class TreeSelect extends React.Component {
|
|
|
359
354
|
showSearch
|
|
360
355
|
allowClear
|
|
361
356
|
style={{
|
|
362
|
-
width: '100%'
|
|
363
|
-
borderLeft: 'none'
|
|
357
|
+
width: '100%'
|
|
364
358
|
}}
|
|
365
359
|
treeData={this.props.treeData}
|
|
366
360
|
fieldNames={this.props.fieldNames}
|
package/SearchForm/index.d.ts
CHANGED
|
@@ -19,6 +19,14 @@ interface searchFormProps extends ComponentProps {
|
|
|
19
19
|
* @description 表单内容列表 [<Form.Item>...</Form.Item>,...]
|
|
20
20
|
*/
|
|
21
21
|
formLine: Array<React.ReactNode>;
|
|
22
|
+
/**
|
|
23
|
+
* @description 加载中
|
|
24
|
+
*/
|
|
25
|
+
loading?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* @description 表单默认值,只有初始化以及重置时生效
|
|
28
|
+
*/
|
|
29
|
+
initialValues?:object
|
|
22
30
|
/**
|
|
23
31
|
* @description 组件挂载完成 通过事件返回form实例
|
|
24
32
|
*/
|
package/SearchForm/index.js
CHANGED
|
@@ -13,14 +13,17 @@ class searchForm extends React.Component {
|
|
|
13
13
|
expand,
|
|
14
14
|
formLine,
|
|
15
15
|
colSize,
|
|
16
|
+
loading,
|
|
16
17
|
onReset
|
|
17
18
|
} = this.props;
|
|
18
19
|
return /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
|
19
20
|
type: "primary",
|
|
20
21
|
icon: /*#__PURE__*/React.createElement(SearchOutlined, null),
|
|
21
|
-
htmlType: "submit"
|
|
22
|
+
htmlType: "submit",
|
|
23
|
+
loading: loading
|
|
22
24
|
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
|
|
23
25
|
icon: /*#__PURE__*/React.createElement(UndoOutlined, null),
|
|
26
|
+
loading: loading,
|
|
24
27
|
onClick: () => onReset()
|
|
25
28
|
}, "\u91CD\u7F6E"), expand && formLine.length / colSize > 1 && /*#__PURE__*/React.createElement(Button, {
|
|
26
29
|
icon: /*#__PURE__*/React.createElement(DoubleRightOutlined, {
|
|
@@ -46,14 +49,16 @@ class searchForm extends React.Component {
|
|
|
46
49
|
}
|
|
47
50
|
render() {
|
|
48
51
|
const {
|
|
49
|
-
colSize,
|
|
50
52
|
style,
|
|
53
|
+
colSize,
|
|
54
|
+
initialValues,
|
|
51
55
|
onFinish
|
|
52
56
|
} = this.props;
|
|
53
57
|
const formItemList = this.groupsList();
|
|
54
58
|
return /*#__PURE__*/React.createElement(Form, {
|
|
55
59
|
ref: this.form,
|
|
56
60
|
style: style,
|
|
61
|
+
initialValues: initialValues,
|
|
57
62
|
onFinish: values => onFinish(values)
|
|
58
63
|
}, /*#__PURE__*/React.createElement(Row, {
|
|
59
64
|
gutter: [16, 16]
|
|
@@ -71,7 +76,9 @@ searchForm.defaultProps = {
|
|
|
71
76
|
style: {},
|
|
72
77
|
expand: false,
|
|
73
78
|
colSize: 3,
|
|
79
|
+
loading: false,
|
|
74
80
|
formLine: [],
|
|
81
|
+
initialValues: {},
|
|
75
82
|
onRef: () => {},
|
|
76
83
|
onReset: () => {},
|
|
77
84
|
onFinish: () => {}
|
|
@@ -80,7 +87,9 @@ searchForm.propTypes = {
|
|
|
80
87
|
style: PropTypes.object,
|
|
81
88
|
expand: PropTypes.bool,
|
|
82
89
|
colSize: PropTypes.number,
|
|
90
|
+
loading: PropTypes.bool,
|
|
83
91
|
formLine: PropTypes.array,
|
|
92
|
+
initialValues: PropTypes.object,
|
|
84
93
|
onRef: PropTypes.func,
|
|
85
94
|
onReset: PropTypes.func,
|
|
86
95
|
onFinish: PropTypes.func
|
package/SearchForm/index.mjs
CHANGED
|
@@ -15,6 +15,7 @@ class searchForm extends React.Component {
|
|
|
15
15
|
expand,
|
|
16
16
|
formLine,
|
|
17
17
|
colSize,
|
|
18
|
+
loading,
|
|
18
19
|
onReset
|
|
19
20
|
} = this.props;
|
|
20
21
|
return (
|
|
@@ -23,11 +24,13 @@ class searchForm extends React.Component {
|
|
|
23
24
|
type="primary"
|
|
24
25
|
icon={<SearchOutlined />}
|
|
25
26
|
htmlType="submit"
|
|
27
|
+
loading={loading}
|
|
26
28
|
>
|
|
27
29
|
查询
|
|
28
30
|
</Button>
|
|
29
31
|
<Button
|
|
30
32
|
icon={<UndoOutlined />}
|
|
33
|
+
loading={loading}
|
|
31
34
|
onClick={() => onReset()}
|
|
32
35
|
>
|
|
33
36
|
重置
|
|
@@ -69,8 +72,9 @@ class searchForm extends React.Component {
|
|
|
69
72
|
|
|
70
73
|
render () {
|
|
71
74
|
const {
|
|
72
|
-
colSize,
|
|
73
75
|
style,
|
|
76
|
+
colSize,
|
|
77
|
+
initialValues,
|
|
74
78
|
onFinish
|
|
75
79
|
} = this.props;
|
|
76
80
|
const formItemList = this.groupsList();
|
|
@@ -78,6 +82,7 @@ class searchForm extends React.Component {
|
|
|
78
82
|
<Form
|
|
79
83
|
ref={this.form}
|
|
80
84
|
style={style}
|
|
85
|
+
initialValues={initialValues}
|
|
81
86
|
onFinish={values => onFinish(values)}
|
|
82
87
|
>
|
|
83
88
|
<Row gutter={[ 16, 16 ]}>
|
|
@@ -104,7 +109,9 @@ searchForm.defaultProps = {
|
|
|
104
109
|
style: {},
|
|
105
110
|
expand: false,
|
|
106
111
|
colSize: 3,
|
|
112
|
+
loading: false,
|
|
107
113
|
formLine: [],
|
|
114
|
+
initialValues: {},
|
|
108
115
|
onRef: () => {},
|
|
109
116
|
onReset: () => {},
|
|
110
117
|
onFinish: () => {},
|
|
@@ -113,7 +120,9 @@ searchForm.propTypes = {
|
|
|
113
120
|
style: PropTypes.object,
|
|
114
121
|
expand: PropTypes.bool,
|
|
115
122
|
colSize: PropTypes.number,
|
|
123
|
+
loading: PropTypes.bool,
|
|
116
124
|
formLine: PropTypes.array,
|
|
125
|
+
initialValues: PropTypes.object,
|
|
117
126
|
onRef: PropTypes.func,
|
|
118
127
|
onReset: PropTypes.func,
|
|
119
128
|
onFinish: PropTypes.func,
|