@hw-component/form 1.10.88 → 1.10.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.
|
@@ -118,7 +118,8 @@ var Index = function Index(_ref) {
|
|
|
118
118
|
footer: footer,
|
|
119
119
|
confirmLoading: loading,
|
|
120
120
|
params: formParams,
|
|
121
|
-
onOk: footerOnOk
|
|
121
|
+
onOk: footerOnOk,
|
|
122
|
+
onCancel: cancel
|
|
122
123
|
});
|
|
123
124
|
var selfAfterClose = function selfAfterClose() {
|
|
124
125
|
if (autoClear) {
|
|
@@ -121,7 +121,8 @@ var Index = function Index(_ref) {
|
|
|
121
121
|
footer: footer,
|
|
122
122
|
confirmLoading: loading,
|
|
123
123
|
params: formParams,
|
|
124
|
-
onOk: footerOnOk
|
|
124
|
+
onOk: footerOnOk,
|
|
125
|
+
onCancel: cancel
|
|
125
126
|
});
|
|
126
127
|
var selfAfterClose = function selfAfterClose() {
|
|
127
128
|
if (autoClear) {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import { Button } from "antd";
|
|
|
2
2
|
import { HDrawerForm, useHDialogForm } from "../../components";
|
|
3
3
|
import { MediaTypeEnum } from "../../components/Upload/enums";
|
|
4
4
|
import FormItem from "../../components/Form/FormItem";
|
|
5
|
-
import {
|
|
5
|
+
import {useEffect, useState} from "react";
|
|
6
6
|
const Test = () => {
|
|
7
7
|
return <FormItem name="input" label="你好" />;
|
|
8
8
|
};
|
|
@@ -42,37 +42,19 @@ const Test1 = ({ formNode, dialogForm, params }) => {
|
|
|
42
42
|
};
|
|
43
43
|
export default () => {
|
|
44
44
|
const modalForm = useHDialogForm();
|
|
45
|
+
const [visible,setVisible]=useState(false);
|
|
45
46
|
return (
|
|
46
47
|
<>
|
|
47
48
|
<Button
|
|
48
49
|
onClick={() => {
|
|
49
|
-
|
|
50
|
-
modalForm.show({
|
|
51
|
-
initialValues: {
|
|
52
|
-
checkboxGroup: 1,
|
|
53
|
-
urlUpload: [
|
|
54
|
-
{
|
|
55
|
-
name: "https://yzimage.52youzai.net/eeff9ae7fded45b7bdca95c6fc72ba3c.mp4",
|
|
56
|
-
response: {
|
|
57
|
-
url: "https://yzimage.52youzai.net/eeff9ae7fded45b7bdca95c6fc72ba3c.mp4",
|
|
58
|
-
},
|
|
59
|
-
status: "done",
|
|
60
|
-
uid: `init-${num}`,
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
},
|
|
64
|
-
});
|
|
50
|
+
setVisible(true);
|
|
65
51
|
}}
|
|
66
52
|
>
|
|
67
53
|
显示
|
|
68
54
|
</Button>
|
|
69
55
|
<Button
|
|
70
56
|
onClick={() => {
|
|
71
|
-
|
|
72
|
-
initialValues: {
|
|
73
|
-
input: "12312",
|
|
74
|
-
},
|
|
75
|
-
});
|
|
57
|
+
setVisible(true);
|
|
76
58
|
}}
|
|
77
59
|
>
|
|
78
60
|
打开
|
|
@@ -81,8 +63,11 @@ export default () => {
|
|
|
81
63
|
configData={data}
|
|
82
64
|
labelWidth={88}
|
|
83
65
|
labelAlign={"left"}
|
|
84
|
-
|
|
66
|
+
visible={visible}
|
|
85
67
|
autoClear={false}
|
|
68
|
+
onCancel={()=>{
|
|
69
|
+
setVisible(false);
|
|
70
|
+
}}
|
|
86
71
|
request={(values) => {
|
|
87
72
|
return Promise.resolve();
|
|
88
73
|
}}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Button} from "antd";
|
|
2
2
|
import {
|
|
3
3
|
HModalForm,
|
|
4
4
|
useHDialogForm,
|
|
5
5
|
HFormConfigProvider,
|
|
6
6
|
} from "../../components";
|
|
7
|
+
import {useState} from "react";
|
|
7
8
|
|
|
8
9
|
const data = [
|
|
9
10
|
{ label: "name", name: "name", hover: "1312" },
|
|
@@ -32,13 +33,13 @@ const time = async () => {
|
|
|
32
33
|
};
|
|
33
34
|
export default () => {
|
|
34
35
|
const modalForm = useHDialogForm();
|
|
36
|
+
const [visible,setVisible]=useState(false);
|
|
37
|
+
const [loading,setLoading]=useState(false)
|
|
35
38
|
return (
|
|
36
39
|
<>
|
|
37
40
|
<Button
|
|
38
41
|
onClick={() => {
|
|
39
|
-
|
|
40
|
-
params: { id: "231231" },
|
|
41
|
-
});
|
|
42
|
+
setVisible(true);
|
|
42
43
|
}}
|
|
43
44
|
>
|
|
44
45
|
打开
|
|
@@ -46,6 +47,7 @@ export default () => {
|
|
|
46
47
|
<Button
|
|
47
48
|
onClick={() => {
|
|
48
49
|
modalForm.show({
|
|
50
|
+
title:"好的",
|
|
49
51
|
initialValues: {
|
|
50
52
|
name: "name",
|
|
51
53
|
},
|
|
@@ -65,11 +67,14 @@ export default () => {
|
|
|
65
67
|
>
|
|
66
68
|
<HModalForm
|
|
67
69
|
configData={data}
|
|
70
|
+
visible={visible}
|
|
71
|
+
onCancel={()=>{
|
|
72
|
+
setVisible(false);
|
|
73
|
+
}}
|
|
68
74
|
formItemStyle={{
|
|
69
75
|
marginBottom: 100,
|
|
70
76
|
}}
|
|
71
77
|
labelAlign={"left"}
|
|
72
|
-
dialogForm={modalForm}
|
|
73
78
|
request={async () => {
|
|
74
79
|
console.log("fff");
|
|
75
80
|
await time();
|