@@ -9,6 +9,7 @@ name | type | default | description | required
99style | Object | - | CSS(Cascading Style Sheets) | N
1010custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
1111colon | Boolean | false | \- | N
12+ content-align | String | left | options: left/right | N
1213data | Object | {} | Typescript: ` FormData ` | N
1314error-message | Object | - | Typescript: ` FormErrorMessage ` | N
1415label-align | String | right | options: left/right/top | N
@@ -26,7 +27,7 @@ submit-with-warning-message | Boolean | false | \- | N
2627name | params | description
2728-- | -- | --
2829reset | ` (detail: { e?: FormResetEvent }) ` | [ see more ts definition] ( https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts )
29- submit | ` (context : SubmitContext<FormData>) ` | [ see more ts definition] ( https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/form/type.ts ) 。<br />` interface SubmitContext<T extends Data = Data> { e?: FormSubmitEvent; validateResult: FormValidateResult<T>; firstError?: string; fields?: any } ` <br /><br />` type FormValidateResult<T> = boolean \| ValidateResultObj<T> ` <br /><br />` type ValidateResultObj<T> = { [key in keyof T]: boolean \| ValidateResultList } ` <br /><br />` type ValidateResultList = Array<AllValidateResult> ` <br /><br />` type AllValidateResult = CustomValidateObj \| ValidateResultType ` <br /><br />` interface ValidateResultType extends FormRule { result: boolean } ` <br /><br />` type ValidateResult<T> = { [key in keyof T]: boolean \| ErrorList } ` <br /><br />` type ErrorList = Array<FormRule> ` <br />
30+ submit | ` (detail : SubmitContext<FormData>) ` | [ see more ts definition] ( https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/form/type.ts ) 。<br />` interface SubmitContext<T extends Data = Data> { e?: FormSubmitEvent; validateResult: FormValidateResult<T>; firstError?: string; fields?: any } ` <br /><br />` type FormValidateResult<T> = boolean \| ValidateResultObj<T> ` <br /><br />` type ValidateResultObj<T> = { [key in keyof T]: boolean \| ValidateResultList } ` <br /><br />` type ValidateResultList = Array<AllValidateResult> ` <br /><br />` type AllValidateResult = CustomValidateObj \| ValidateResultType ` <br /><br />` interface ValidateResultType extends FormRule { result: boolean } ` <br /><br />` type ValidateResult<T> = { [key in keyof T]: boolean \| ErrorList } ` <br /><br />` type ErrorList = Array<FormRule> ` <br />
3031validate | ` (result: ValidateResultContext<FormData>) ` | [ see more ts definition] ( https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/form/type.ts ) 。<br />` type ValidateResultContext<T extends Data> = Omit<SubmitContext<T>, 'e'> ` <br />
3132
3233### FormInstanceFunctions 组件实例方法
@@ -47,6 +48,7 @@ name | type | default | description | required
4748style | Object | - | CSS(Cascading Style Sheets) | N
4849custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
4950arrow | Boolean | false | \- | N
51+ content-align | String | - | options: left/right | N
5052help | String | - | \- | N
5153label | String | '' | \- | N
5254label-align | String | - | options: left/right/top | N
0 commit comments