refactor(components): unite syntax for emits declaration (#4512)

This commit is contained in:
J-Michalek
2025-07-14 10:46:47 +02:00
committed by GitHub
parent 488707e148
commit 6f2ce5c610
7 changed files with 15 additions and 15 deletions

View File

@@ -57,7 +57,7 @@ export interface AlertProps {
}
export interface AlertEmits {
(e: 'update:open', value: boolean): void
'update:open': [value: boolean]
}
export interface AlertSlots {

View File

@@ -35,7 +35,7 @@ export interface ChipProps {
}
export interface ChipEmits {
(e: 'update:show', payload: boolean): void
'update:show': [payload: boolean]
}
export interface ChipSlots {

View File

@@ -53,8 +53,8 @@ export interface FormProps<S extends FormSchema, T extends boolean = true> {
}
export interface FormEmits<S extends FormSchema, T extends boolean = true> {
(e: 'submit', payload: FormSubmitEvent<FormData<S, T>>): void
(e: 'error', payload: FormErrorEvent): void
submit: [payload: FormSubmitEvent<FormData<S, T>>]
error: [payload: FormErrorEvent]
}
export interface FormSlots {

View File

@@ -52,9 +52,9 @@ export interface InputProps<T extends AcceptableValue = AcceptableValue> extends
}
export interface InputEmits<T extends AcceptableValue = AcceptableValue> {
(e: 'update:modelValue', payload: T): void
(e: 'blur', event: FocusEvent): void
(e: 'change', event: Event): void
'update:modelValue': [payload: T]
'blur': [event: FocusEvent]
'change': [event: Event]
}
export interface InputSlots {

View File

@@ -63,9 +63,9 @@ export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue
}
export interface InputNumberEmits {
(e: 'update:modelValue', payload: number): void
(e: 'blur', event: FocusEvent): void
(e: 'change', payload: Event): void
'update:modelValue': [payload: number]
'blur': [event: FocusEvent]
'change': [payload: Event]
}
export interface InputNumberSlots {

View File

@@ -39,8 +39,8 @@ export interface SliderProps extends Pick<SliderRootProps, 'name' | 'disabled' |
}
export interface SliderEmits<T extends number | number[] = number | number[]> {
(e: 'update:modelValue', payload: T): void
(e: 'change', payload: Event): void
'update:modelValue': [payload: T]
'change': [payload: Event]
}
</script>

View File

@@ -55,9 +55,9 @@ export interface TextareaProps<T extends TextareaValue = TextareaValue> extends
}
export interface TextareaEmits<T extends TextareaValue = TextareaValue> {
(e: 'update:modelValue', payload: T): void
(e: 'blur', event: FocusEvent): void
(e: 'change', event: Event): void
'update:modelValue': [payload: T]
'blur': [event: FocusEvent]
'change': [event: Event]
}
export interface TextareaSlots {