mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-30 03:38:54 +01:00
chore(Slider): improve update:modelValue event signature
This commit is contained in:
@@ -34,9 +34,9 @@ export interface InputProps extends UseComponentIconsProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface InputEmits {
|
export interface InputEmits {
|
||||||
|
(e: 'update:modelValue', payload: string | number): void
|
||||||
(e: 'blur', event: FocusEvent): void
|
(e: 'blur', event: FocusEvent): void
|
||||||
(e: 'change', event: Event): void
|
(e: 'change', event: Event): void
|
||||||
(e: 'update:modelValue', payload: string | number): void
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface InputSlots {
|
export interface InputSlots {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { tv, type VariantProps } from 'tailwind-variants'
|
import { tv, type VariantProps } from 'tailwind-variants'
|
||||||
import type { SliderRootProps, SliderRootEmits } from 'radix-vue'
|
import type { SliderRootProps } from 'radix-vue'
|
||||||
import type { AppConfig } from '@nuxt/schema'
|
import type { AppConfig } from '@nuxt/schema'
|
||||||
import _appConfig from '#build/app.config'
|
import _appConfig from '#build/app.config'
|
||||||
import theme from '#build/ui/slider'
|
import theme from '#build/ui/slider'
|
||||||
@@ -30,8 +30,9 @@ export interface SliderProps extends Pick<SliderRootProps, 'name' | 'disabled' |
|
|||||||
ui?: Partial<typeof slider.slots>
|
ui?: Partial<typeof slider.slots>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SliderEmits = Omit<SliderRootEmits, 'valueCommit'> & {
|
export interface SliderEmits {
|
||||||
change: [payload: Event]
|
(e: 'update:modelValue', payload: number | number[]): void
|
||||||
|
(e: 'change', payload: Event): void
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ export interface TextareaProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface TextareaEmits {
|
export interface TextareaEmits {
|
||||||
|
(e: 'update:modelValue', payload: string | number): void
|
||||||
(e: 'blur', event: FocusEvent): void
|
(e: 'blur', event: FocusEvent): void
|
||||||
(e: 'change', event: Event): void
|
(e: 'change', event: Event): void
|
||||||
(e: 'update:modelValue', payload: string | number): void
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TextareaSlots {
|
export interface TextareaSlots {
|
||||||
|
|||||||
Reference in New Issue
Block a user