mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-20 06:51:46 +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 {
|
||||
(e: 'update:modelValue', payload: string | number): void
|
||||
(e: 'blur', event: FocusEvent): void
|
||||
(e: 'change', event: Event): void
|
||||
(e: 'update:modelValue', payload: string | number): void
|
||||
}
|
||||
|
||||
export interface InputSlots {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
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 _appConfig from '#build/app.config'
|
||||
import theme from '#build/ui/slider'
|
||||
@@ -30,8 +30,9 @@ export interface SliderProps extends Pick<SliderRootProps, 'name' | 'disabled' |
|
||||
ui?: Partial<typeof slider.slots>
|
||||
}
|
||||
|
||||
export type SliderEmits = Omit<SliderRootEmits, 'valueCommit'> & {
|
||||
change: [payload: Event]
|
||||
export interface SliderEmits {
|
||||
(e: 'update:modelValue', payload: number | number[]): void
|
||||
(e: 'change', payload: Event): void
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ export interface TextareaProps {
|
||||
}
|
||||
|
||||
export interface TextareaEmits {
|
||||
(e: 'update:modelValue', payload: string | number): void
|
||||
(e: 'blur', event: FocusEvent): void
|
||||
(e: 'change', event: Event): void
|
||||
(e: 'update:modelValue', payload: string | number): void
|
||||
}
|
||||
|
||||
export interface TextareaSlots {
|
||||
|
||||
Reference in New Issue
Block a user