import { ExtractPropTypes, ComponentPublicInstance } from 'vue'; import { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils, ITinyVm } from '../../../shared.type'; import { calcPaneInstances, calcMorePanes, calcExpandPanes, handleTabClick, handleTabRemove, handleTabAdd, setCurrentName, changeCurrentName, created, changeDirection, handleTabDragStart, handleTabDragOver, handleTabDragEnd } from './renderless'; export type { ISharedRenderlessParamHooks } from '../../../shared.type'; export declare const $constants: { TAB_ITEM: string; }; export declare const tabsProps: { _constants: { type: ObjectConstructor; default: () => { TAB_ITEM: string; }; }; tabStyle: StringConstructor; activeName: StringConstructor; withClose: BooleanConstructor; withAdd: BooleanConstructor; size: StringConstructor; activeColor: { type: StringConstructor; default: string; }; modelValue: {}; editable: BooleanConstructor; position: { type: StringConstructor; default: string; }; beforeLeave: FunctionConstructor; stretch: BooleanConstructor; showMoreTabs: BooleanConstructor; swipeable: { type: BooleanConstructor; default: boolean; }; popperClass: StringConstructor; popperAppendToBody: { type: BooleanConstructor; default: boolean; }; dropConfig: { type: ObjectConstructor; default: () => null; }; separator: BooleanConstructor; showExpandTabs: BooleanConstructor; expandTabsTitle: StringConstructor; expandTabsMode: StringConstructor; tooltipConfig: (StringConstructor | ObjectConstructor)[]; optimized: { type: BooleanConstructor; default: boolean; }; beforeClose: FunctionConstructor; overflowTitle: BooleanConstructor; titleWidth: StringConstructor; }; export interface ITabsState { panes: ITabsPaneVm[] | []; currentName: string; currentIndex: number; showPanesCount: number; startX: number; startY: number; deltaX: number; deltaY: number; offsetX: number; offsetY: number; direction: string; expandPanesWidth: string | number; activeIndex: number; morePanes?: ITabsPaneVm[]; separator?: boolean; } /** *tab根元素实例对象 */ export type ITabsVm = ComponentPublicInstance & { state: ITabsState; } & ITabsProps; export type ITabsPaneVm = ITinyVm<{ TAB_ITEM: string; }> | ITabsPane | ITabsVm; /** * pane对象类型 */ export interface ITabsPane { name: string; disabled: boolean; state: ITabsState; } /** * 自定义拖拽事件 */ export interface ITabsCustomEvent { originalEvent: DragEvent; oldDraggableIndex: number; newDraggableIndex: number; } export interface ITabsApi { state: ITabsState; handleTabAdd: ReturnType; handleTabRemove: ReturnType; changeDirection: ReturnType; changeCurrentName: ReturnType; calcMorePanes: ReturnType; calcExpandPanes: ReturnType; calcPaneInstances: ReturnType; handleTabDragStart: ReturnType; handleTabDragOver: ReturnType; handleTabDragEnd: ReturnType; handleTabClick: ReturnType; setCurrentName: ReturnType; created: ReturnType; } export type ITabsProps = ExtractPropTypes; export type ITabsConstants = typeof $constants; export type ITabsRenderlessParamUtils = ISharedRenderlessParamUtils; export type ITabsRenderlessParams = ISharedRenderlessFunctionParams & { state: ITabsState; props: ITabsProps; api: ITabsApi; };