mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-29 11:20:36 +01:00
chore(components): add missing emits for docs
This commit is contained in:
@@ -38,6 +38,10 @@ export interface CheckboxSlots {
|
|||||||
label(props: { label?: string }): any
|
label(props: { label?: string }): any
|
||||||
description(props: { description?: string }): any
|
description(props: { description?: string }): any
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface CheckboxEmits {
|
||||||
|
(e: 'update:modelValue', payload: boolean): void
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -48,6 +52,7 @@ import { useId, useAppConfig, useFormField } from '#imports'
|
|||||||
|
|
||||||
const props = defineProps<CheckboxProps>()
|
const props = defineProps<CheckboxProps>()
|
||||||
const slots = defineSlots<CheckboxSlots>()
|
const slots = defineSlots<CheckboxSlots>()
|
||||||
|
defineEmits<CheckboxEmits>()
|
||||||
|
|
||||||
const modelValue = defineModel<boolean | undefined>({ default: undefined })
|
const modelValue = defineModel<boolean | undefined>({ default: undefined })
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ export interface ChipSlots {
|
|||||||
default(props?: any): any
|
default(props?: any): any
|
||||||
content(props?: any): any
|
content(props?: any): any
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ChipEmits {
|
||||||
|
(e: 'update:show', payload: boolean): void
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ export interface InputProps extends UseComponentIconsProps {
|
|||||||
export interface InputEmits {
|
export interface InputEmits {
|
||||||
(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 {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export interface SliderProps extends Omit<SliderRootProps, 'asChild' | 'modelVal
|
|||||||
ui?: Partial<typeof slider.slots>
|
ui?: Partial<typeof slider.slots>
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SliderEmits extends Omit<SliderRootEmits, 'update:modelValue'> {}
|
export interface SliderEmits extends SliderRootEmits {}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ export interface SwitchSlots {
|
|||||||
label(props: { label?: string }): any
|
label(props: { label?: string }): any
|
||||||
description(props: { description?: string }): any
|
description(props: { description?: string }): any
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SwitchEmits {
|
||||||
|
(e: 'update:modelValue', payload: boolean): void
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -47,6 +51,7 @@ import { useId, useAppConfig, useFormField } from '#imports'
|
|||||||
|
|
||||||
const props = defineProps<SwitchProps>()
|
const props = defineProps<SwitchProps>()
|
||||||
const slots = defineSlots<SwitchSlots>()
|
const slots = defineSlots<SwitchSlots>()
|
||||||
|
defineEmits<SwitchEmits>()
|
||||||
|
|
||||||
const modelValue = defineModel<boolean | undefined>({ default: undefined })
|
const modelValue = defineModel<boolean | undefined>({ default: undefined })
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ export interface TextareaProps {
|
|||||||
export interface TextareaEmits {
|
export interface TextareaEmits {
|
||||||
(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