mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-02-02 05:08:03 +01:00
fix(InputTags): extend emits interface
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { AppConfig } from '@nuxt/schema'
|
import type { AppConfig } from '@nuxt/schema'
|
||||||
import type { TagsInputRootProps, AcceptableInputValue } from 'reka-ui'
|
import type { TagsInputRootProps, TagsInputRootEmits, AcceptableInputValue } from 'reka-ui'
|
||||||
import theme from '#build/ui/input-tags'
|
import theme from '#build/ui/input-tags'
|
||||||
import type { UseComponentIconsProps } from '../composables/useComponentIcons'
|
import type { UseComponentIconsProps } from '../composables/useComponentIcons'
|
||||||
import type { AvatarProps } from '../types'
|
import type { AvatarProps } from '../types'
|
||||||
@@ -44,11 +44,10 @@ export interface InputTagsProps<T extends InputTagItem = InputTagItem> extends P
|
|||||||
ui?: InputTags['slots']
|
ui?: InputTags['slots']
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InputTagsEmits<T extends InputTagItem> = {
|
export interface InputTagsEmits<T extends InputTagItem> extends TagsInputRootEmits<T> {
|
||||||
'update:modelValue': [payload: T[]]
|
change: [event: Event]
|
||||||
'change': [payload: Event]
|
blur: [event: FocusEvent]
|
||||||
'blur': [payload: FocusEvent]
|
focus: [event: FocusEvent]
|
||||||
'focus': [payload: FocusEvent]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type SlotProps<T extends InputTagItem> = (props: { item: T, index: number }) => any
|
type SlotProps<T extends InputTagItem> = (props: { item: T, index: number }) => any
|
||||||
@@ -72,6 +71,7 @@ import { useComponentIcons } from '../composables/useComponentIcons'
|
|||||||
import { useFormField } from '../composables/useFormField'
|
import { useFormField } from '../composables/useFormField'
|
||||||
import { tv } from '../utils/tv'
|
import { tv } from '../utils/tv'
|
||||||
import UIcon from './Icon.vue'
|
import UIcon from './Icon.vue'
|
||||||
|
import UAvatar from './Avatar.vue'
|
||||||
|
|
||||||
defineOptions({ inheritAttrs: false })
|
defineOptions({ inheritAttrs: false })
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user