@hw-component/form 1.10.41 → 1.10.42
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/es/Select/hooks/norHooks.js +6 -5
- package/es/Select/index.js +2 -1
- package/lib/Select/hooks/norHooks.js +6 -5
- package/lib/Select/index.js +2 -1
- package/package.json +3 -3
- package/src/components/Select/hooks/norHooks.ts +1 -0
- package/src/components/Select/index.tsx +1 -1
- package/src/pages/Form/index.tsx +18 -6
|
@@ -91,21 +91,22 @@ var useOptionsRequest = function useOptionsRequest(_ref) {
|
|
|
91
91
|
resetSaveParams();
|
|
92
92
|
setData(undefined);
|
|
93
93
|
}
|
|
94
|
+
console.log(saveParams.listParams, "console.log(saveParams.listParams)");
|
|
94
95
|
saveParams.listParams.reqParams = params;
|
|
95
96
|
if (!(isList && saveParams.listParams.isEnd)) {
|
|
96
|
-
_context.next =
|
|
97
|
+
_context.next = 9;
|
|
97
98
|
break;
|
|
98
99
|
}
|
|
99
100
|
return _context.abrupt("return", data);
|
|
100
|
-
case
|
|
101
|
+
case 9:
|
|
101
102
|
if (!request) {
|
|
102
|
-
_context.next =
|
|
103
|
+
_context.next = 11;
|
|
103
104
|
break;
|
|
104
105
|
}
|
|
105
106
|
return _context.abrupt("return", request(paramsProvider(params), formData));
|
|
106
|
-
case 10:
|
|
107
|
-
return _context.abrupt("return", Promise.resolve(options));
|
|
108
107
|
case 11:
|
|
108
|
+
return _context.abrupt("return", Promise.resolve(options));
|
|
109
|
+
case 12:
|
|
109
110
|
case "end":
|
|
110
111
|
return _context.stop();
|
|
111
112
|
}
|
package/es/Select/index.js
CHANGED
|
@@ -51,7 +51,8 @@ var Index = function Index(_ref) {
|
|
|
51
51
|
propsOnPopupScroll = _ref.onPopupScroll,
|
|
52
52
|
addonBefore = _ref.addonBefore,
|
|
53
53
|
addonAfter = _ref.addonAfter,
|
|
54
|
-
className = _ref.className,
|
|
54
|
+
_ref$className = _ref.className,
|
|
55
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
55
56
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
56
57
|
var _ref2 = (modeConfig === null || modeConfig === void 0 ? void 0 : modeConfig[mode || ""]) || {},
|
|
57
58
|
icon = _ref2.icon,
|
|
@@ -92,21 +92,22 @@ var useOptionsRequest = function useOptionsRequest(_ref) {
|
|
|
92
92
|
resetSaveParams();
|
|
93
93
|
setData(undefined);
|
|
94
94
|
}
|
|
95
|
+
console.log(saveParams.listParams, "console.log(saveParams.listParams)");
|
|
95
96
|
saveParams.listParams.reqParams = params;
|
|
96
97
|
if (!(isList && saveParams.listParams.isEnd)) {
|
|
97
|
-
_context.next =
|
|
98
|
+
_context.next = 9;
|
|
98
99
|
break;
|
|
99
100
|
}
|
|
100
101
|
return _context.abrupt("return", data);
|
|
101
|
-
case
|
|
102
|
+
case 9:
|
|
102
103
|
if (!request) {
|
|
103
|
-
_context.next =
|
|
104
|
+
_context.next = 11;
|
|
104
105
|
break;
|
|
105
106
|
}
|
|
106
107
|
return _context.abrupt("return", request(paramsProvider(params), formData));
|
|
107
|
-
case 10:
|
|
108
|
-
return _context.abrupt("return", Promise.resolve(options));
|
|
109
108
|
case 11:
|
|
109
|
+
return _context.abrupt("return", Promise.resolve(options));
|
|
110
|
+
case 12:
|
|
110
111
|
case "end":
|
|
111
112
|
return _context.stop();
|
|
112
113
|
}
|
package/lib/Select/index.js
CHANGED
|
@@ -54,7 +54,8 @@ var Index = function Index(_ref) {
|
|
|
54
54
|
propsOnPopupScroll = _ref.onPopupScroll,
|
|
55
55
|
addonBefore = _ref.addonBefore,
|
|
56
56
|
addonAfter = _ref.addonAfter,
|
|
57
|
-
className = _ref.className,
|
|
57
|
+
_ref$className = _ref.className,
|
|
58
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
58
59
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
59
60
|
var _ref2 = (modeConfig === null || modeConfig === void 0 ? void 0 : modeConfig[mode || ""]) || {},
|
|
60
61
|
icon = _ref2.icon,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hw-component/form",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.42",
|
|
4
4
|
"description": "基于antd二次开发",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@types/react-dom": "17.0.9",
|
|
58
58
|
"@typescript-eslint/eslint-plugin": "^5.59.7",
|
|
59
59
|
"@umijs/fabric": "^2.14.1",
|
|
60
|
-
"antd": "4.
|
|
60
|
+
"antd": "4.21.7",
|
|
61
61
|
"autoprefixer": "^10.4.14",
|
|
62
62
|
"babel-loader": "^9.1.2",
|
|
63
63
|
"css-loader": "^6.7.4",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"@ant-design/icons": "4.6.2",
|
|
93
|
-
"antd": "4.
|
|
93
|
+
"antd": "4.21.7",
|
|
94
94
|
"react": "17.0.0",
|
|
95
95
|
"react-dom": "17.0.2"
|
|
96
96
|
},
|
|
@@ -75,6 +75,7 @@ const useOptionsRequest = ({
|
|
|
75
75
|
resetSaveParams();
|
|
76
76
|
setData(undefined);
|
|
77
77
|
}
|
|
78
|
+
console.log(saveParams.listParams,"console.log(saveParams.listParams)")
|
|
78
79
|
saveParams.listParams.reqParams = params;
|
|
79
80
|
if (isList && saveParams.listParams.isEnd) {
|
|
80
81
|
return data;
|
package/src/pages/Form/index.tsx
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
HRangePicker,
|
|
8
8
|
} from "../../components";
|
|
9
9
|
import { useEffect, useState } from "react";
|
|
10
|
-
import {
|
|
10
|
+
import {Button, Col, Form, Input, Row, Space} from "antd";
|
|
11
11
|
const Test3 = ({ value = {}, onChange }) => {
|
|
12
12
|
const { fs, end } = value;
|
|
13
13
|
return (
|
|
@@ -124,13 +124,17 @@ export default () => {
|
|
|
124
124
|
{
|
|
125
125
|
name: "time",
|
|
126
126
|
label: "time",
|
|
127
|
-
type: "
|
|
127
|
+
type: "select",
|
|
128
|
+
rules:[{required:true}],
|
|
128
129
|
itemProps: {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
end: "timeEnd",
|
|
132
|
-
},
|
|
130
|
+
options:[{value:"label",key:1}],
|
|
131
|
+
mode:"multiple"
|
|
133
132
|
},
|
|
133
|
+
render:(props, node)=>{
|
|
134
|
+
return <Row style={{width:800}}>
|
|
135
|
+
<Col span={12}>{node}</Col>
|
|
136
|
+
</Row>
|
|
137
|
+
}
|
|
134
138
|
},
|
|
135
139
|
{
|
|
136
140
|
name: "time1",
|
|
@@ -155,9 +159,17 @@ export default () => {
|
|
|
155
159
|
onFinish={(val) => {
|
|
156
160
|
console.log(val);
|
|
157
161
|
}}
|
|
162
|
+
layout={"vertical"}
|
|
158
163
|
/>
|
|
159
164
|
</div>
|
|
160
165
|
</HFormConfigProvider>
|
|
166
|
+
<Form layout={"vertical"}>
|
|
167
|
+
<Form.Item label={123123}>
|
|
168
|
+
<Col span={12}>
|
|
169
|
+
<HSelect options={[{value:"label",key:1}]} mode="multiple"/>
|
|
170
|
+
</Col>
|
|
171
|
+
</Form.Item>
|
|
172
|
+
</Form>
|
|
161
173
|
<div
|
|
162
174
|
onClick={async () => {
|
|
163
175
|
const result = await form.validateFields();
|