You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CSS(Cascading Style Sheets),used to set style on virtual component
N
colon
Boolean
false
-
N
data
Object
{}
Typescript:FormData
N
disabled
Boolean
undefined
-
N
error-message
Object
-
Typescript:FormErrorMessage
N
label-align
String
right
options: left/right/top
N
label-width
String / Number
'81px'
-
N
readonly
Boolean
undefined
-
N
required-mark
Boolean
undefined
-
N
required-mark-position
String
-
Display position of required symbols。options: left/right
N
reset-type
String
empty
options: empty/initial
N
rules
Object
-
Typescript:FormRules<FormData>type FormRules<T extends Data = any> = { [field in keyof T]?: Array<FormRule> }。see more ts definition
N
scroll-to-first-error
String
-
options: ''/smooth/auto
N
show-error-message
Boolean
true
-
N
submit-with-warning-message
Boolean
false
-
N
Form Events
name
params
description
reset
(detail: { e?: FormResetEvent })
-
submit
(context: SubmitContext<FormData>)
see more ts definition。 interface SubmitContext<T extends Data = Data> { e?: FormSubmitEvent; validateResult: FormValidateResult<T>; firstError?: string; fields?: any }
type FormValidateResult<T> = boolean | ValidateResultObj<T>
type ValidateResultObj<T> = { [key in keyof T]: boolean | ValidateResultList }
type ValidateResultList = Array<AllValidateResult>
type AllValidateResult = CustomValidateObj | ValidateResultType