mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
refactor(components): unite syntax for emits declaration (#4512)
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user