mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
fix(FormGroup): ensure size exists in config (#695)
Co-authored-by: Sma11X <540351143@qq.com> Co-authored-by: saveliy <savelii.moshkota@ext.jumingo.com>
This commit is contained in:
@@ -54,7 +54,10 @@ export const useFormGroup = (inputProps?: InputProps, config?: any) => {
|
||||
return {
|
||||
inputId,
|
||||
name: computed(() => inputProps?.name ?? formGroup?.name.value),
|
||||
size: computed(() => inputProps?.size ?? formGroup?.size.value ?? config?.default?.size),
|
||||
size: computed(() => {
|
||||
const formGroupSize = config.size[formGroup?.size.value] ? formGroup?.size.value : null
|
||||
return inputProps?.size ?? formGroupSize ?? config?.default?.size
|
||||
}),
|
||||
color: computed(() => formGroup?.error?.value ? 'red' : inputProps?.color),
|
||||
emitFormBlur,
|
||||
emitFormInput,
|
||||
|
||||
Reference in New Issue
Block a user