UNPKG

vuux

Version:

Vue3 Nuxt3 Nuxt4 组件库

43 lines (42 loc) 715 B
import { Ref } from 'vue'; /** * Props */ export interface Props { active?: string; remove?: boolean; position?: 'top' | 'left' | string; } /** * ItemProps */ export interface ItemProps { id?: string | number; name: string; icon?: string; disabled?: boolean; } /** * Tab类型 */ export interface Tab { id?: string | number; name: string; icon?: string; disabled?: boolean; computedTabId?: string; } /** * 上下文类型 */ export type TabsContext = { addTabs: (tab: Tab | Tab[]) => void; activeTab: Ref<Tab>; }; /** * 组件事件类型 */ export type Emits = { (event: 'select', value: Tab): void; (event: 'remove', value: Tab): void; };