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 { export interface AlertEmits {
(e: 'update:open', value: boolean): void 'update:open': [value: boolean]
} }
export interface AlertSlots { export interface AlertSlots {

View File

@@ -35,7 +35,7 @@ export interface ChipProps {
} }
export interface ChipEmits { export interface ChipEmits {
(e: 'update:show', payload: boolean): void 'update:show': [payload: boolean]
} }
export interface ChipSlots { 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> { export interface FormEmits<S extends FormSchema, T extends boolean = true> {
(e: 'submit', payload: FormSubmitEvent<FormData<S, T>>): void submit: [payload: FormSubmitEvent<FormData<S, T>>]
(e: 'error', payload: FormErrorEvent): void error: [payload: FormErrorEvent]
} }
export interface FormSlots { export interface FormSlots {

View File

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

View File

@@ -63,9 +63,9 @@ export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue
} }
export interface InputNumberEmits { export interface InputNumberEmits {
(e: 'update:modelValue', payload: number): void 'update:modelValue': [payload: number]
(e: 'blur', event: FocusEvent): void 'blur': [event: FocusEvent]
(e: 'change', payload: Event): void 'change': [payload: Event]
} }
export interface InputNumberSlots { 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[]> { export interface SliderEmits<T extends number | number[] = number | number[]> {
(e: 'update:modelValue', payload: T): void 'update:modelValue': [payload: T]
(e: 'change', payload: Event): void 'change': [payload: Event]
} }
</script> </script>

View File

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