UNPKG

1.25 kBTypeScriptView Raw
1import type { ComponentPublicInstance, ComputedRef } from 'vue';
2import type { Numeric } from '../utils';
3import type { TabsProps } from './Tabs';
4export type TabsType = 'line' | 'card';
5export type TabsClickTabEventParams = {
6 name: Numeric;
7 title: string;
8 event: MouseEvent;
9 disabled: boolean;
10};
11export type TabsProvide = {
12 id: string;
13 props: TabsProps;
14 setLine: () => void;
15 scrollable: ComputedRef<boolean>;
16 onRendered: (name: Numeric, title?: string) => void;
17 currentName: ComputedRef<Numeric | undefined>;
18 setTitleRefs: (index: number) => (el: unknown) => void;
19 scrollIntoView: (immediate?: boolean) => void;
20};
21export type TabsExpose = {
22 resize: () => void;
23 scrollTo: (name: Numeric) => void;
24};
25export type TabsInstance = ComponentPublicInstance<TabsProps, TabsExpose>;
26export type TabsThemeVars = {
27 tabTextColor?: string;
28 tabActiveTextColor?: string;
29 tabDisabledTextColor?: string;
30 tabFontSize?: string;
31 tabLineHeight?: number | string;
32 tabsDefaultColor?: string;
33 tabsLineHeight?: number | string;
34 tabsCardHeight?: string;
35 tabsNavBackground?: string;
36 tabsBottomBarWidth?: string;
37 tabsBottomBarHeight?: string;
38 tabsBottomBarColor?: string;
39};