vuux
Version:
Vue3 Nuxt3 Nuxt4 组件库
38 lines (37 loc) • 1.26 kB
TypeScript
import { Emits, Props, Tab } from '../types';
/**
* hook
*
* @param props 组件属性
* @param emits 组件事件
*/
export declare const useTabs: (props: Props, emits: Emits) => {
state: {
showNavigation: boolean;
disableLeftScroll: boolean;
disableRightScroll: boolean;
scrollOffset: number;
};
list: import('vue').Ref<{
id?: string | number | undefined;
name: string;
icon?: string | undefined;
disabled?: boolean | undefined;
computedTabId?: string | undefined;
}[], Tab[] | {
id?: string | number | undefined;
name: string;
icon?: string | undefined;
disabled?: boolean | undefined;
computedTabId?: string | undefined;
}[]>;
headDataEl: import('vue').Ref<HTMLDivElement | null, HTMLDivElement | null>;
headItemEl: import('vue').Ref<HTMLDivElement[], HTMLDivElement[]>;
classNames: import('vue').ComputedRef<string>;
isArrow: import('vue').ComputedRef<boolean>;
isDisabled: import('vue').ComputedRef<boolean>;
tabClassNames: (item: Tab) => Record<string, boolean>;
handleSelectTab: (tab: Tab) => void;
handleRemoveTab: (tab: Tab) => void;
handleScrollTabs: (dir: number) => void;
};