mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
@@ -48,7 +48,7 @@ import { omit } from 'lodash-es'
|
|||||||
import UIcon from '../elements/Icon.vue'
|
import UIcon from '../elements/Icon.vue'
|
||||||
import UButton from '../elements/Button.vue'
|
import UButton from '../elements/Button.vue'
|
||||||
import StateEmitter from '../../utils/StateEmitter'
|
import StateEmitter from '../../utils/StateEmitter'
|
||||||
import type { Button } from '../../types/button'
|
import type { AccordionItem } from '../../types/accordion'
|
||||||
import { useAppConfig } from '#imports'
|
import { useAppConfig } from '#imports'
|
||||||
// TODO: Remove
|
// TODO: Remove
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
@@ -66,7 +66,7 @@ export default defineComponent({
|
|||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
props: {
|
props: {
|
||||||
items: {
|
items: {
|
||||||
type: Array as PropType<Partial<Button & { slot: string, disabled: boolean, content: string, defaultOpen: boolean, closeOthers: boolean }>[]>,
|
type: Array as PropType<AccordionItem[]>,
|
||||||
default: () => []
|
default: () => []
|
||||||
},
|
},
|
||||||
defaultOpen: {
|
defaultOpen: {
|
||||||
|
|||||||
9
src/runtime/types/accordion.d.ts
vendored
Normal file
9
src/runtime/types/accordion.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import type { Button } from './button'
|
||||||
|
|
||||||
|
export interface AccordionItem extends Partial<Button> {
|
||||||
|
slot?: string
|
||||||
|
disabled?: boolean
|
||||||
|
content?: string
|
||||||
|
defaultOpen?: boolean
|
||||||
|
closeOthers?: boolean
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user