@hw-component/form 1.10.93 → 1.10.94
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.
|
@@ -131,6 +131,7 @@ var Index = function Index(props) {
|
|
|
131
131
|
rules: cuRules,
|
|
132
132
|
noStyle: noStyle,
|
|
133
133
|
hidden: disHide,
|
|
134
|
+
dependencies: dependencies,
|
|
134
135
|
children: noStyle ? defaultRender(form) : jsxRuntime.jsx(Content, {
|
|
135
136
|
helper: helper,
|
|
136
137
|
children: defaultRender(form)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hw-component/form",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.94",
|
|
4
4
|
"description": "基于antd二次开发",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"react-color": "2.19.3"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
+
"ahooks": "2.10.9",
|
|
43
44
|
"@ant-design/icons": "4.6.2",
|
|
44
45
|
"@babel/core": "^7.21.8",
|
|
45
46
|
"@babel/plugin-transform-runtime": "^7.23.2",
|
package/src/pages/Form/index.tsx
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
} from "../../components";
|
|
10
10
|
import { useEffect, useState } from "react";
|
|
11
11
|
import { Button, Col, Form, Input, Row, Space } from "antd";
|
|
12
|
+
|
|
12
13
|
const Test3 = ({ value = {}, onChange }) => {
|
|
13
14
|
const { fs, end } = value;
|
|
14
15
|
return (
|
|
@@ -149,10 +150,39 @@ export default () => {
|
|
|
149
150
|
const [aForm] = Form.useForm();
|
|
150
151
|
return (
|
|
151
152
|
<div style={{ overflow: "auto", height: "90vh" }}>
|
|
152
|
-
<Form form={aForm}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
<Form form={aForm}>
|
|
154
|
+
<Form.Item
|
|
155
|
+
name="password"
|
|
156
|
+
label="Password"
|
|
157
|
+
rules={[
|
|
158
|
+
{
|
|
159
|
+
required: true,
|
|
160
|
+
message: 'Please input your password!',
|
|
161
|
+
},
|
|
162
|
+
]}
|
|
163
|
+
hasFeedback
|
|
164
|
+
>
|
|
165
|
+
<Input />
|
|
166
|
+
</Form.Item>
|
|
167
|
+
<Form.Item
|
|
168
|
+
name="confirm"
|
|
169
|
+
label="Confirm Password"
|
|
170
|
+
dependencies={['password']}
|
|
171
|
+
rules={[
|
|
172
|
+
{
|
|
173
|
+
required: true,
|
|
174
|
+
message: 'Please confirm your password!',
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
validator(_, value) {
|
|
178
|
+
console.log("ffff")
|
|
179
|
+
return Promise.reject(new Error('The two passwords that you entered do not match!'));
|
|
180
|
+
},
|
|
181
|
+
}
|
|
182
|
+
]}
|
|
183
|
+
>
|
|
184
|
+
<Input/>
|
|
185
|
+
</Form.Item>
|
|
156
186
|
</Form>
|
|
157
187
|
<HFormConfigProvider
|
|
158
188
|
valueSwitchMap={{ open: 1, close: 2 }}
|
|
@@ -188,14 +218,14 @@ export default () => {
|
|
|
188
218
|
{
|
|
189
219
|
name: "num",
|
|
190
220
|
label: "你好啊",
|
|
191
|
-
type: "rangePicker",
|
|
192
|
-
hover: ["123123213", "22222"],
|
|
193
|
-
itemProps: {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
},
|
|
221
|
+
// type: "rangePicker",
|
|
222
|
+
// hover: ["123123213", "22222"],
|
|
223
|
+
// itemProps: {
|
|
224
|
+
// valueMap: {
|
|
225
|
+
// start: "start",
|
|
226
|
+
// end: "end",
|
|
227
|
+
// },
|
|
228
|
+
// },
|
|
199
229
|
},
|
|
200
230
|
{
|
|
201
231
|
name: "num1",
|
|
@@ -204,45 +234,19 @@ export default () => {
|
|
|
204
234
|
// hidden: () => {
|
|
205
235
|
// return !form.getFieldValue("num");
|
|
206
236
|
// },
|
|
207
|
-
rules: [
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
mode: "multiple",
|
|
218
|
-
},
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
name: "tt",
|
|
222
|
-
label: "time1",
|
|
223
|
-
type: "rangePicker",
|
|
224
|
-
render: () => {
|
|
225
|
-
return <TestItem />;
|
|
226
|
-
},
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
name: "selectInput",
|
|
230
|
-
label: "selectInput",
|
|
231
|
-
render: () => {
|
|
232
|
-
return <TestItem1 />;
|
|
233
|
-
},
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
label:"数字组",
|
|
237
|
-
type: "inputNumberGroup",
|
|
238
|
-
name:"hhhhh",
|
|
239
|
-
rules:[{required:true,message:"请输入"},{validator:(rule, value, callback)=>{
|
|
240
|
-
return Promise.reject(new Error("错误"))
|
|
241
|
-
}}],
|
|
242
|
-
itemProps:{
|
|
243
|
-
addonMiddle:"发撒冯绍峰撒"
|
|
237
|
+
rules: [
|
|
238
|
+
{
|
|
239
|
+
required: true,
|
|
240
|
+
message: 'Please confirm your password!',
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
validator(_, value) {
|
|
244
|
+
console.log("ffff")
|
|
245
|
+
return Promise.reject(new Error('The two passwords that you entered do not match!'));
|
|
246
|
+
},
|
|
244
247
|
}
|
|
245
|
-
|
|
248
|
+
]
|
|
249
|
+
},
|
|
246
250
|
]}
|
|
247
251
|
dismissOnPressEnter={false}
|
|
248
252
|
form={form}
|