import type SortableJs from 'sortablejs'; import type { ElTabPaneProps } from '../ele-app/el'; import type { DropdownItem } from '../ele-dropdown/types'; /** * 页签数据 */ export interface TabPaneItem extends ElTabPaneProps { /** 插槽名称 */ slot?: string; /** 元数据 */ meta?: any; } /** * 尺寸 */ export type TabSize = 'large' | 'default' | 'small'; /** * 风格类型 */ export type TabType = | 'default' | 'card' | 'border-card' | 'plain' | 'simple' | 'indicator' | 'button' | 'tag'; /** * 页签事件参数 */ export interface TabEventOption { /** 页签标识 */ name?: string | number; /** 页签数据 */ item?: TabPaneItem; /** 当前选中的页签标识 */ active?: string | number; /** 事件标识 */ command?: string; } /** * 获取右键菜单方法 */ export type ContextMenusFunc = (item?: TabPaneItem) => DropdownItem[]; /** * 右键菜单属性 */ export type ContextMenus = DropdownItem[] | ContextMenusFunc; /** * 页签实例数据 */ export interface TabCurrent { /** 拖拽排序实例 */ sortIns?: SortableJs | null; /** 鼠标滚轮事件节流 */ isScroll?: boolean; }