File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " @form-example/app-mobile" ,
3- "version" : " 0.0.13 " ,
3+ "version" : " 0.0.14 " ,
44 "private" : true ,
55 "type" : " module" ,
66 "scripts" : {
Original file line number Diff line number Diff line change 11{
22 "name" : " @form-example/app-pc" ,
3- "version" : " 0.0.13 " ,
3+ "version" : " 0.0.14 " ,
44 "private" : true ,
55 "type" : " module" ,
66 "scripts" : {
Original file line number Diff line number Diff line change 11{
22 "name" : " @coding-form/root" ,
3- "version" : " 0.0.13 " ,
3+ "version" : " 0.0.14 " ,
44 "description" : " form-engine" ,
55 "main" : " index.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change 11{
22 "name" : " @coding-form/form-engine" ,
3- "version" : " 0.0.13 " ,
3+ "version" : " 0.0.14 " ,
44 "description" : " form-engine components" ,
55 "keywords" : [
66 " coding-form" ,
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ export const FormViewContent: React.FC<FormViewContentProps> = (props) => {
4545 { props . header }
4646 < FormSubView
4747 Form = { Form }
48+ form = { props . form }
4849 formCode = { meta . code }
4950 review = { review }
5051 onFinish = { handleOnFinish }
@@ -57,6 +58,7 @@ export const FormViewContent: React.FC<FormViewContentProps> = (props) => {
5758 return (
5859 < FormSubView
5960 Form = { Form }
61+ form = { props . form }
6062 formCode = { item . code }
6163 review = { review }
6264 onFinish = { handleOnFinish }
Original file line number Diff line number Diff line change 11import React from "react" ;
22import { useFormContext } from "@/hooks" ;
3+ import { FormInstance } from "@/instance" ;
34
45interface FormSubViewProps {
6+ form ?: FormInstance ;
57 formCode : string ;
68 Form : React . ComponentType < any > ;
79 review : boolean ;
@@ -50,7 +52,11 @@ export const FormSubView: React.FC<FormSubViewProps> = (props) => {
5052 }
5153 } , [ ] ) ;
5254
53-
55+ React . useEffect ( ( ) => {
56+ if ( props . form ) {
57+ props . form . setPresenter ( context . getPresenter ( ) ) ;
58+ }
59+ } , [ props . form ] ) ;
5460
5561 return (
5662 < Form
You can’t perform that action at this time.
0 commit comments