Skip to content

Commit c1a8d0e

Browse files
committed
add layout
1 parent a9751c3 commit c1a8d0e

7 files changed

Lines changed: 10 additions & 4 deletions

File tree

apps/app-mobile/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@form-example/app-mobile",
3-
"version": "0.0.9",
3+
"version": "0.0.10",
44
"private": true,
55
"type": "module",
66
"scripts": {

apps/app-pc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@form-example/app-pc",
3-
"version": "0.0.9",
3+
"version": "0.0.10",
44
"private": true,
55
"type": "module",
66
"scripts": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coding-form/root",
3-
"version": "0.0.9",
3+
"version": "0.0.10",
44
"description": "form-engine",
55
"main": "index.js",
66
"scripts": {

packages/form-engine/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coding-form/form-engine",
3-
"version": "0.0.9",
3+
"version": "0.0.10",
44
"description": "form-engine components",
55
"keywords": [
66
"coding-form",

packages/form-engine/src/form/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export const FormViewContent: React.FC<FormViewContentProps> = (props) => {
4646
onFinish={handleOnFinish}
4747
onBlur={handleOnBlur}
4848
children={props.children}
49+
layout={props.layout}
4950
/>
5051
{subFormList && subFormList.map(item=>{
5152
return (
@@ -55,6 +56,7 @@ export const FormViewContent: React.FC<FormViewContentProps> = (props) => {
5556
review={review}
5657
onFinish={handleOnFinish}
5758
onBlur={handleOnBlur}
59+
layout={props.layout}
5860
/>
5961
)
6062
})}

packages/form-engine/src/form/sub-view.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ interface FormSubViewProps {
88
onFinish: (values:any,formCode:string) => void;
99
onBlur: (formCode:string) => void;
1010
children?:React.ReactNode;
11+
layout?:'horizontal' | 'vertical';
1112
}
1213

1314
export const FormSubView: React.FC<FormSubViewProps> = (props) => {
@@ -53,6 +54,7 @@ export const FormSubView: React.FC<FormSubViewProps> = (props) => {
5354
return (
5455
<Form
5556
form={formTarget}
57+
layout={props.layout}
5658
onBlur={()=>{
5759
props.onBlur(props.formCode);
5860
}}

packages/form-engine/src/types/view.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ export interface FormViewProps {
9696
meta: FormMeta;
9797
/** 表单操控对象 */
9898
form?: FormInstance;
99+
/** 布局方向 **/
100+
layout?:'horizontal' | 'vertical';
99101
/** 表单提交数据 **/
100102
onFinish?: (values:any,formCode?:string) => void;
101103
/** 表单失去焦点事件 **/

0 commit comments

Comments
 (0)