Skip to content

Commit 3afa458

Browse files
committed
update FlowFormOpinion
1 parent a9b35cc commit 3afa458

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

mobile-ui/src/components/flow/components/FlowFormOpinion.tsx

+20-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, {useContext, useEffect} from "react";
22
import Form from "@/components/form";
3-
import FormTextArea from "@/components/form/textarea";
43
import {FlowViewReactContext} from "@/components/flow/view";
54

65

@@ -18,20 +17,27 @@ const FlowFormOpinion = ()=>{
1817
<>
1918
<Form
2019
actionRef={opinionAction}
21-
>
22-
<FormTextArea
23-
name={"advice"}
24-
label={"审批意见"}
25-
textAreaRows={2}
26-
required={true}
27-
validateFunction={async (content)=>{
28-
const value = content.value;
29-
if(value){
30-
return [];
20+
loadFields={async ()=>{
21+
return [
22+
{
23+
type:'textarea',
24+
props:{
25+
name:"advice",
26+
label:"审批意见",
27+
textAreaRows:2,
28+
required:true,
29+
validateFunction:async (content)=>{
30+
const value = content.value;
31+
if(value){
32+
return [];
33+
}
34+
return ["请输入审批意见"];
35+
}
36+
}
3137
}
32-
return ["请输入审批意见"];
33-
}}
34-
/>
38+
]
39+
}}
40+
>
3541
</Form>
3642
</>
3743
)

0 commit comments

Comments
 (0)