Skip to content

Commit

Permalink
types(BfForm): Adding BfForm types
Browse files Browse the repository at this point in the history
  • Loading branch information
kailong321200875 committed Dec 12, 2021
1 parent 184b468 commit bc9195b
Showing 1 changed file with 57 additions and 5 deletions.
62 changes: 57 additions & 5 deletions src/types/components-type.d.ts
Expand Up @@ -19,6 +19,7 @@ declare global {
| 'Transfer'
| 'Divider'
| 'TimeSelect'
| 'SelectV2'

declare type ColProps = {
span?: number
Expand All @@ -40,16 +41,14 @@ declare global {
validator?: (rule: any, value: FormValueTypes, callback: Fn) => void | boolean
}

declare type FormItem = {
prop?: string
label?: string
declare type FormItemProps = {
labelWidth?: string | number
required?: boolean
rules?: FormRules | FormRules[]
error?: string
showMessage?: boolean
inlineMessage?: boolean
size?: ElememtPlusSzie
style?: CSSProperties
}

declare type FormOptions = {
Expand Down Expand Up @@ -425,6 +424,53 @@ declare global {
contentPosition?: 'left' | 'right' | 'center'
}

declare type TimeSelectProps = {
disabled?: boolean
editable?: boolean
clearable?: boolean
placeholder?: string
name?: string
prefixIcon?: string | Component
clearIcon?: string | Component
start?: string
end?: string
step?: string
minTime?: string
maxTime?: string
}

declare type SelectV2Props = {
multiple?: boolean
disabled?: boolean
valueKey?: string
clearable?: boolean
collapsetags?: boolean
multiplelimit?: number
name?: string
autocomplete?: string
placeholder?: string
filterable?: boolean
allowCreate?: boolean
noDataText?: string
popperClass?: string
popperAppendToBody?: boolean
popperOptions?: Recordable
automaticDropdown?: boolean
clearIcon?: string | Component
height?: number
scrollbarAlwaysOn?: boolean
onChange?: ChangeEvent
onVisibleChange?: (val: boolean) => void
onRemoveTag?: (val: string | number) => void
onClear?: () => void
onBlur?: BlurOrFocusEvent
onFocus?: BlurOrFocusEvent
slots?: {
default?: boolean
empty?: boolean
}
}

declare type FormSchema = {
/**
* @field form model key
Expand Down Expand Up @@ -460,7 +506,13 @@ declare global {
| ColorPickerProps
| TransferProps
| DividerProps
// formItemProps?: ElFormItem
| TimeSelectProps
| SelectV2Props

/**
* @formItemProps form-item props
*/
formItemProps?: FormItemProps

/**
* @component Component
Expand Down

0 comments on commit bc9195b

Please sign in to comment.