vue-stack-tabs 0.1.35 → 0.1.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/src/lib/StackTabs.vue.d.ts +140 -13
- package/dist/src/lib/components/ContextMenu/ContextMenuItem.vue.d.ts +3 -3
- package/dist/src/lib/components/ContextMenu/index.vue.d.ts +13 -12
- package/dist/src/lib/components/PageLoading.vue.d.ts +3 -3
- package/dist/src/lib/components/TabHeader/TabHeaderButton.vue.d.ts +11 -11
- package/dist/src/lib/components/TabHeader/TabHeaderItem.vue.d.ts +4 -4
- package/dist/src/lib/components/TabHeader/TabHeaderScroll.vue.d.ts +11 -11
- package/dist/src/lib/components/TabHeader/index.vue.d.ts +15 -14
- package/dist/src/lib/hooks/useContextMenu.d.ts +3 -2
- package/dist/src/lib/hooks/useStackTab.d.ts +4 -2
- package/dist/src/lib/hooks/useTabMitt.d.ts +3 -2
- package/dist/src/lib/hooks/useTabRouter.d.ts +2 -1
- package/dist/src/lib/hooks/useTabpanel.d.ts +7 -6
- package/dist/src/lib/i18n/index.d.ts +1 -1
- package/dist/src/lib/iframe.vue.d.ts +1 -1
- package/dist/src/lib/index.d.ts +8 -8
- package/dist/src/lib/utils/TabIdHelper.d.ts +2 -1
- package/dist/src/lib/utils/TabScrollHelper.d.ts +3 -3
- package/dist/style.css +1 -1
- package/dist/vue-stack-tabs.es.js +1370 -1516
- package/dist/vue-stack-tabs.umd.js +2 -3
- package/package.json +47 -50
- package/src/lib/StackTabs.vue +14 -3
- package/src/lib/assets/style/transition.scss +22 -0
- package/src/lib/hooks/useStackTab.ts +116 -103
- package/src/lib/hooks/useTabRouter.ts +4 -0
- package/src/lib/hooks/useTabpanel.tsx +2 -1
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# Vue Stack Tabs
|
|
2
|
-
|
|
1
|
+
# Vue Stack Tabs
|
|
2
|
+
|
|
3
3
|
Vue.js tab components, based on Vue Router.
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { TransitionProps, DefineComponent } from 'vue';
|
|
2
|
+
import { ITabData, TabScrollMode } from './model/TabModel';
|
|
3
|
+
|
|
4
|
+
declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
4
5
|
defaultTabs?: ITabData[] | undefined;
|
|
5
6
|
max?: number | undefined;
|
|
6
7
|
append?: string | undefined;
|
|
7
8
|
contextmenu?: boolean | object | undefined;
|
|
8
9
|
pageTransition?: string | undefined;
|
|
10
|
+
pageTransitionBack?: string | undefined;
|
|
9
11
|
tabTransition?: string | TransitionProps | undefined;
|
|
10
12
|
tabScrollMode?: TabScrollMode | undefined;
|
|
11
13
|
width?: string | undefined;
|
|
@@ -21,21 +23,23 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
21
23
|
contextmenu: boolean;
|
|
22
24
|
tabTransition: string;
|
|
23
25
|
pageTransition: string;
|
|
26
|
+
pageTransitionBack: string;
|
|
24
27
|
tabScrollMode: TabScrollMode;
|
|
25
28
|
width: string;
|
|
26
29
|
height: string;
|
|
27
30
|
i18n: string;
|
|
28
31
|
space: number;
|
|
29
32
|
globalScroll: boolean;
|
|
30
|
-
}>, {}, unknown, {}, {}, import(
|
|
33
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
31
34
|
onActive: (...args: any[]) => void;
|
|
32
35
|
onPageLoaded: (...args: any[]) => void;
|
|
33
|
-
}, string, import(
|
|
36
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
34
37
|
defaultTabs?: ITabData[] | undefined;
|
|
35
38
|
max?: number | undefined;
|
|
36
39
|
append?: string | undefined;
|
|
37
40
|
contextmenu?: boolean | object | undefined;
|
|
38
41
|
pageTransition?: string | undefined;
|
|
42
|
+
pageTransitionBack?: string | undefined;
|
|
39
43
|
tabTransition?: string | TransitionProps | undefined;
|
|
40
44
|
tabScrollMode?: TabScrollMode | undefined;
|
|
41
45
|
width?: string | undefined;
|
|
@@ -51,6 +55,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
51
55
|
contextmenu: boolean;
|
|
52
56
|
tabTransition: string;
|
|
53
57
|
pageTransition: string;
|
|
58
|
+
pageTransitionBack: string;
|
|
54
59
|
tabScrollMode: TabScrollMode;
|
|
55
60
|
width: string;
|
|
56
61
|
height: string;
|
|
@@ -61,8 +66,8 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
61
66
|
onOnActive?: ((...args: any[]) => any) | undefined;
|
|
62
67
|
onOnPageLoaded?: ((...args: any[]) => any) | undefined;
|
|
63
68
|
}, {
|
|
64
|
-
contextmenu: boolean | object;
|
|
65
69
|
max: number;
|
|
70
|
+
contextmenu: boolean | object;
|
|
66
71
|
space: number;
|
|
67
72
|
width: string;
|
|
68
73
|
tabScrollMode: TabScrollMode;
|
|
@@ -70,6 +75,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
70
75
|
defaultTabs: ITabData[];
|
|
71
76
|
append: string;
|
|
72
77
|
pageTransition: string;
|
|
78
|
+
pageTransitionBack: string;
|
|
73
79
|
height: string;
|
|
74
80
|
i18n: string;
|
|
75
81
|
globalScroll: boolean;
|
|
@@ -78,15 +84,127 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
78
84
|
rightButton?(_: {}): any;
|
|
79
85
|
}>;
|
|
80
86
|
export default _default;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
export declare const __VLS_globalTypesStart: {};
|
|
88
|
+
declare global {
|
|
89
|
+
type __VLS_IntrinsicElements = __VLS_PickNotAny<import('vue/jsx-runtime').JSX.IntrinsicElements, __VLS_PickNotAny<globalThis.JSX.IntrinsicElements, Record<string, any>>>;
|
|
90
|
+
type __VLS_Element = __VLS_PickNotAny<import('vue/jsx-runtime').JSX.Element, globalThis.JSX.Element>;
|
|
91
|
+
type __VLS_GlobalComponents = __VLS_PickNotAny<import('vue').GlobalComponents, {}> & __VLS_PickNotAny<import('@vue/runtime-core').GlobalComponents, {}> & __VLS_PickNotAny<import('@vue/runtime-dom').GlobalComponents, {}> & Pick<typeof import('vue'), 'Transition' | 'TransitionGroup' | 'KeepAlive' | 'Suspense' | 'Teleport'>;
|
|
92
|
+
type __VLS_BuiltInPublicProps = __VLS_PickNotAny<import('vue').VNodeProps, {}> & __VLS_PickNotAny<import('vue').AllowedComponentProps, {}> & __VLS_PickNotAny<import('vue').ComponentCustomProps, {}>;
|
|
93
|
+
type __VLS_IsAny<T> = 0 extends 1 & T ? true : false;
|
|
94
|
+
type __VLS_PickNotAny<A, B> = __VLS_IsAny<A> extends true ? B : A;
|
|
95
|
+
const __VLS_intrinsicElements: __VLS_IntrinsicElements;
|
|
96
|
+
function __VLS_getVForSourceType(source: number): [number, number, number][];
|
|
97
|
+
function __VLS_getVForSourceType(source: string): [string, number, number][];
|
|
98
|
+
function __VLS_getVForSourceType<T extends any[]>(source: T): [
|
|
99
|
+
item: T[number],
|
|
100
|
+
key: number,
|
|
101
|
+
index: number
|
|
102
|
+
][];
|
|
103
|
+
function __VLS_getVForSourceType<T extends {
|
|
104
|
+
[Symbol.iterator](): Iterator<any>;
|
|
105
|
+
}>(source: T): [
|
|
106
|
+
item: T extends {
|
|
107
|
+
[Symbol.iterator](): Iterator<infer T1>;
|
|
108
|
+
} ? T1 : never,
|
|
109
|
+
key: number,
|
|
110
|
+
index: undefined
|
|
111
|
+
][];
|
|
112
|
+
function __VLS_getVForSourceType<T extends number | {
|
|
113
|
+
[Symbol.iterator](): Iterator<any>;
|
|
114
|
+
}>(source: T): [
|
|
115
|
+
item: number | (Exclude<T, number> extends {
|
|
116
|
+
[Symbol.iterator](): Iterator<infer T1>;
|
|
117
|
+
} ? T1 : never),
|
|
118
|
+
key: number,
|
|
119
|
+
index: undefined
|
|
120
|
+
][];
|
|
121
|
+
function __VLS_getVForSourceType<T>(source: T): [
|
|
122
|
+
item: T[keyof T],
|
|
123
|
+
key: keyof T,
|
|
124
|
+
index: number
|
|
125
|
+
][];
|
|
126
|
+
function __VLS_getSlotParams<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>;
|
|
127
|
+
function __VLS_getSlotParam<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>[0];
|
|
128
|
+
function __VLS_directiveFunction<T>(dir: T): T extends import('vue').ObjectDirective<infer E, infer V> | import('vue').FunctionDirective<infer E, infer V> ? (value: V) => void : T;
|
|
129
|
+
function __VLS_withScope<T, K>(ctx: T, scope: K): ctx is T & K;
|
|
130
|
+
function __VLS_makeOptional<T>(t: T): {
|
|
131
|
+
[K in keyof T]?: T[K];
|
|
132
|
+
};
|
|
133
|
+
type __VLS_SelfComponent<N, C> = string extends N ? {} : N extends string ? {
|
|
134
|
+
[P in N]: C;
|
|
135
|
+
} : {};
|
|
136
|
+
type __VLS_WithComponent<N0 extends string, LocalComponents, N1 extends string, N2 extends string, N3 extends string> = N1 extends keyof LocalComponents ? N1 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : {
|
|
137
|
+
[K in N0]: LocalComponents[N1];
|
|
138
|
+
} : N2 extends keyof LocalComponents ? N2 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : {
|
|
139
|
+
[K in N0]: LocalComponents[N2];
|
|
140
|
+
} : N3 extends keyof LocalComponents ? N3 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : {
|
|
141
|
+
[K in N0]: LocalComponents[N3];
|
|
142
|
+
} : N1 extends keyof __VLS_GlobalComponents ? N1 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : {
|
|
143
|
+
[K in N0]: __VLS_GlobalComponents[N1];
|
|
144
|
+
} : N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : {
|
|
145
|
+
[K in N0]: __VLS_GlobalComponents[N2];
|
|
146
|
+
} : N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : {
|
|
147
|
+
[K in N0]: __VLS_GlobalComponents[N3];
|
|
85
148
|
} : {
|
|
86
|
-
|
|
87
|
-
required: true;
|
|
149
|
+
[K in N0]: unknown;
|
|
88
150
|
};
|
|
89
|
-
|
|
151
|
+
function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K): T extends new (...args: any) => any ? (props: (K extends {
|
|
152
|
+
$props: infer Props;
|
|
153
|
+
} ? Props : any) & Record<string, unknown>, ctx?: any) => __VLS_Element & {
|
|
154
|
+
__ctx?: {
|
|
155
|
+
attrs?: any;
|
|
156
|
+
slots?: K extends {
|
|
157
|
+
$slots: infer Slots;
|
|
158
|
+
} ? Slots : any;
|
|
159
|
+
emit?: K extends {
|
|
160
|
+
$emit: infer Emit;
|
|
161
|
+
} ? Emit : any;
|
|
162
|
+
} & {
|
|
163
|
+
props?: (K extends {
|
|
164
|
+
$props: infer Props;
|
|
165
|
+
} ? Props : any) & Record<string, unknown>;
|
|
166
|
+
expose?(exposed: K): void;
|
|
167
|
+
};
|
|
168
|
+
} : T extends () => any ? (props: {}, ctx?: any) => ReturnType<T> : T extends (...args: any) => any ? T : (_: {} & Record<string, unknown>, ctx?: any) => {
|
|
169
|
+
__ctx?: {
|
|
170
|
+
attrs?: any;
|
|
171
|
+
expose?: any;
|
|
172
|
+
slots?: any;
|
|
173
|
+
emit?: any;
|
|
174
|
+
props?: {} & Record<string, unknown>;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
function __VLS_elementAsFunction<T>(tag: T, endTag?: T): (_: T & Record<string, unknown>) => void;
|
|
178
|
+
function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): Parameters<T>['length'] extends 2 ? [any] : [];
|
|
179
|
+
function __VLS_pickFunctionalComponentCtx<T, K>(comp: T, compInstance: K): __VLS_PickNotAny<'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends {
|
|
180
|
+
__ctx?: infer Ctx;
|
|
181
|
+
} ? Ctx : never : any, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any>;
|
|
182
|
+
type __VLS_FunctionalComponentProps<T, K> = '__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends {
|
|
183
|
+
__ctx?: {
|
|
184
|
+
props?: infer P;
|
|
185
|
+
};
|
|
186
|
+
} ? NonNullable<P> : never : T extends (props: infer P, ...args: any) => any ? P : {};
|
|
187
|
+
type __VLS_AsFunctionOrAny<F> = unknown extends F ? any : ((...args: any) => any) extends F ? F : any;
|
|
188
|
+
function __VLS_normalizeSlot<S>(s: S): S extends () => infer R ? (props: {}) => R : S;
|
|
189
|
+
/**
|
|
190
|
+
* emit
|
|
191
|
+
*/
|
|
192
|
+
type __VLS_UnionToIntersection<U> = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never;
|
|
193
|
+
type __VLS_OverloadUnionInner<T, U = unknown> = U & T extends (...args: infer A) => infer R ? U extends T ? never : __VLS_OverloadUnionInner<T, Pick<T, keyof T> & U & ((...args: A) => R)> | ((...args: A) => R) : never;
|
|
194
|
+
type __VLS_OverloadUnion<T> = Exclude<__VLS_OverloadUnionInner<(() => never) & T>, T extends () => never ? never : () => never>;
|
|
195
|
+
type __VLS_ConstructorOverloads<T> = __VLS_OverloadUnion<T> extends infer F ? F extends (event: infer E, ...args: infer A) => any ? {
|
|
196
|
+
[K in E & string]: (...args: A) => void;
|
|
197
|
+
} : never : never;
|
|
198
|
+
type __VLS_NormalizeEmits<T> = __VLS_PrettifyGlobal<__VLS_UnionToIntersection<__VLS_ConstructorOverloads<T> & {
|
|
199
|
+
[K in keyof T]: T[K] extends any[] ? {
|
|
200
|
+
(...args: T[K]): void;
|
|
201
|
+
} : never;
|
|
202
|
+
}>>;
|
|
203
|
+
type __VLS_PrettifyGlobal<T> = {
|
|
204
|
+
[K in keyof T]: T[K];
|
|
205
|
+
} & {};
|
|
206
|
+
}
|
|
207
|
+
export declare const __VLS_globalTypesEnd: {};
|
|
90
208
|
type __VLS_WithDefaults<P, D> = {
|
|
91
209
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
92
210
|
default: D[K];
|
|
@@ -100,3 +218,12 @@ type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
100
218
|
$slots: S;
|
|
101
219
|
};
|
|
102
220
|
};
|
|
221
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
222
|
+
type __VLS_TypePropsToOption<T> = {
|
|
223
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
224
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
225
|
+
} : {
|
|
226
|
+
type: import('vue').PropType<T[K]>;
|
|
227
|
+
required: true;
|
|
228
|
+
};
|
|
229
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<{
|
|
2
2
|
icon?: string | undefined;
|
|
3
3
|
title: string;
|
|
4
|
-
}>, {}, unknown, {}, {}, import(
|
|
4
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
5
5
|
icon?: string | undefined;
|
|
6
6
|
title: string;
|
|
7
7
|
}>>>, {}, {}>;
|
|
8
8
|
export default _default;
|
|
9
9
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
-
type
|
|
10
|
+
type __VLS_TypePropsToOption<T> = {
|
|
11
11
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
12
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
13
|
} : {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { ITabItem, IContextMenu } from '../../model/TabModel';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
3
4
|
index: number;
|
|
4
5
|
left: number;
|
|
5
6
|
top: number;
|
|
@@ -10,7 +11,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
10
11
|
left: number;
|
|
11
12
|
top: number;
|
|
12
13
|
contextMen: never[];
|
|
13
|
-
}>, {}, unknown, {}, {}, import(
|
|
14
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
14
15
|
index: number;
|
|
15
16
|
left: number;
|
|
16
17
|
top: number;
|
|
@@ -26,15 +27,6 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
26
27
|
top: number;
|
|
27
28
|
}, {}>;
|
|
28
29
|
export default _default;
|
|
29
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
30
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
31
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
32
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
33
|
-
} : {
|
|
34
|
-
type: import('vue').PropType<T[K]>;
|
|
35
|
-
required: true;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
30
|
type __VLS_WithDefaults<P, D> = {
|
|
39
31
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
40
32
|
default: D[K];
|
|
@@ -43,3 +35,12 @@ type __VLS_WithDefaults<P, D> = {
|
|
|
43
35
|
type __VLS_Prettify<T> = {
|
|
44
36
|
[K in keyof T]: T[K];
|
|
45
37
|
} & {};
|
|
38
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
39
|
+
type __VLS_TypePropsToOption<T> = {
|
|
40
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
41
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
42
|
+
} : {
|
|
43
|
+
type: import('vue').PropType<T[K]>;
|
|
44
|
+
required: true;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<{
|
|
2
2
|
tId: string;
|
|
3
|
-
}>, {}, unknown, {}, {}, import(
|
|
3
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
4
4
|
tId: string;
|
|
5
5
|
}>>>, {}, {}>;
|
|
6
6
|
export default _default;
|
|
7
7
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
8
|
-
type
|
|
8
|
+
type __VLS_TypePropsToOption<T> = {
|
|
9
9
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
10
10
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
11
11
|
} : {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: __VLS_WithTemplateSlots<import(
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
2
2
|
disabled?: boolean | undefined;
|
|
3
3
|
shadow?: string | null | undefined;
|
|
4
4
|
iconClass?: string | undefined;
|
|
@@ -7,7 +7,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
7
7
|
disabled: boolean;
|
|
8
8
|
shadow: null;
|
|
9
9
|
iconClass: string;
|
|
10
|
-
}>, {}, unknown, {}, {}, import(
|
|
10
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
11
11
|
disabled?: boolean | undefined;
|
|
12
12
|
shadow?: string | null | undefined;
|
|
13
13
|
iconClass?: string | undefined;
|
|
@@ -24,15 +24,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
24
24
|
icon?(_: {}): any;
|
|
25
25
|
}>;
|
|
26
26
|
export default _default;
|
|
27
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
28
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
29
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
30
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
31
|
-
} : {
|
|
32
|
-
type: import('vue').PropType<T[K]>;
|
|
33
|
-
required: true;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
27
|
type __VLS_WithDefaults<P, D> = {
|
|
37
28
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
38
29
|
default: D[K];
|
|
@@ -46,3 +37,12 @@ type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
46
37
|
$slots: S;
|
|
47
38
|
};
|
|
48
39
|
};
|
|
40
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
41
|
+
type __VLS_TypePropsToOption<T> = {
|
|
42
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
43
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
44
|
+
} : {
|
|
45
|
+
type: import('vue').PropType<T[K]>;
|
|
46
|
+
required: true;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<{
|
|
2
2
|
item: ITabItem;
|
|
3
|
-
}>, {}, unknown, {}, {}, import(
|
|
3
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
4
4
|
active: (...args: any[]) => void;
|
|
5
5
|
close: (...args: any[]) => void;
|
|
6
|
-
}, string, import(
|
|
6
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
7
7
|
item: ITabItem;
|
|
8
8
|
}>>> & {
|
|
9
9
|
onActive?: ((...args: any[]) => any) | undefined;
|
|
@@ -11,7 +11,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
|
|
|
11
11
|
}, {}, {}>;
|
|
12
12
|
export default _default;
|
|
13
13
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
14
|
-
type
|
|
14
|
+
type __VLS_TypePropsToOption<T> = {
|
|
15
15
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
16
16
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
17
17
|
} : {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: __VLS_WithTemplateSlots<import(
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
2
2
|
space?: number | undefined;
|
|
3
3
|
isScrollWheel?: boolean | undefined;
|
|
4
4
|
isScrollButton?: boolean | undefined;
|
|
@@ -9,7 +9,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
9
9
|
}>, {
|
|
10
10
|
scrollIntoView: (el: HTMLElement) => void;
|
|
11
11
|
isInView: (el: HTMLElement) => boolean;
|
|
12
|
-
}, unknown, {}, {}, import(
|
|
12
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
13
13
|
space?: number | undefined;
|
|
14
14
|
isScrollWheel?: boolean | undefined;
|
|
15
15
|
isScrollButton?: boolean | undefined;
|
|
@@ -25,15 +25,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
25
25
|
default?(_: {}): any;
|
|
26
26
|
}>;
|
|
27
27
|
export default _default;
|
|
28
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
29
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
30
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
31
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
32
|
-
} : {
|
|
33
|
-
type: import('vue').PropType<T[K]>;
|
|
34
|
-
required: true;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
28
|
type __VLS_WithDefaults<P, D> = {
|
|
38
29
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
39
30
|
default: D[K];
|
|
@@ -47,3 +38,12 @@ type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
47
38
|
$slots: S;
|
|
48
39
|
};
|
|
49
40
|
};
|
|
41
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
42
|
+
type __VLS_TypePropsToOption<T> = {
|
|
43
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
44
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
45
|
+
} : {
|
|
46
|
+
type: import('vue').PropType<T[K]>;
|
|
47
|
+
required: true;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TransitionProps } from 'vue';
|
|
2
2
|
import { TabScrollMode } from '../../model/TabModel';
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
4
5
|
space: number;
|
|
5
6
|
tabScrollMode?: TabScrollMode | undefined;
|
|
6
7
|
tabTransition?: string | TransitionProps | undefined;
|
|
@@ -13,9 +14,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
13
14
|
tabScrollMode: TabScrollMode;
|
|
14
15
|
contextmenu: boolean;
|
|
15
16
|
max: number;
|
|
16
|
-
}>, {}, unknown, {}, {}, import(
|
|
17
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
17
18
|
active: (...args: any[]) => void;
|
|
18
|
-
}, string, import(
|
|
19
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
19
20
|
space: number;
|
|
20
21
|
tabScrollMode?: TabScrollMode | undefined;
|
|
21
22
|
tabTransition?: string | TransitionProps | undefined;
|
|
@@ -31,8 +32,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
31
32
|
}>>> & {
|
|
32
33
|
onActive?: ((...args: any[]) => any) | undefined;
|
|
33
34
|
}, {
|
|
34
|
-
contextmenu: boolean | object;
|
|
35
35
|
max: number;
|
|
36
|
+
contextmenu: boolean | object;
|
|
36
37
|
tabScrollMode: TabScrollMode;
|
|
37
38
|
tabTransition: string | TransitionProps;
|
|
38
39
|
}, {}>, {
|
|
@@ -40,15 +41,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
40
41
|
rightButton?(_: {}): any;
|
|
41
42
|
}>;
|
|
42
43
|
export default _default;
|
|
43
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
44
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
45
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
46
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
47
|
-
} : {
|
|
48
|
-
type: import('vue').PropType<T[K]>;
|
|
49
|
-
required: true;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
44
|
type __VLS_WithDefaults<P, D> = {
|
|
53
45
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
54
46
|
default: D[K];
|
|
@@ -62,3 +54,12 @@ type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
62
54
|
$slots: S;
|
|
63
55
|
};
|
|
64
56
|
};
|
|
57
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
58
|
+
type __VLS_TypePropsToOption<T> = {
|
|
59
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
60
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
61
|
+
} : {
|
|
62
|
+
type: import('vue').PropType<T[K]>;
|
|
63
|
+
required: true;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { throttle } from 'throttle-debounce';
|
|
2
|
+
import { ITabData } from '../model/TabModel';
|
|
3
|
+
|
|
2
4
|
declare const _default: () => {
|
|
3
|
-
openNewTab:
|
|
5
|
+
openNewTab: throttle<(tab: ITabData, renew?: any) => Promise<unknown>>;
|
|
4
6
|
setIFramePath: (path: string) => void;
|
|
5
7
|
active: (id: string, route?: boolean) => void;
|
|
6
8
|
reset: () => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { Emitter, EventType } from 'mitt';
|
|
2
|
+
import { App } from 'vue';
|
|
3
|
+
|
|
3
4
|
declare module '@vue/runtime-core' {
|
|
4
5
|
interface ComponentCustomProperties {
|
|
5
6
|
$layerEmitter: Emitter<Record<EventType, unknown>>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { ITabData, ITabItem, ITabPage } from '../model/TabModel';
|
|
2
|
+
import { DefineComponent, VNode } from 'vue';
|
|
3
|
+
import { RouteLocationNormalizedLoaded } from 'vue-router';
|
|
4
|
+
|
|
4
5
|
declare const _default: () => {
|
|
5
|
-
tabs: import(
|
|
6
|
+
tabs: import('vue').Ref<{
|
|
6
7
|
id: string;
|
|
7
8
|
closable: boolean;
|
|
8
9
|
refreshable: boolean;
|
|
@@ -22,8 +23,8 @@ declare const _default: () => {
|
|
|
22
23
|
};
|
|
23
24
|
title: string;
|
|
24
25
|
}[]>;
|
|
25
|
-
caches: import(
|
|
26
|
-
pageShown: import(
|
|
26
|
+
caches: import('vue').Ref<string[]>;
|
|
27
|
+
pageShown: import('vue').Ref<boolean>;
|
|
27
28
|
initialed: boolean;
|
|
28
29
|
setMaxSize: (size: number) => void;
|
|
29
30
|
canAddTab: () => boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}>;
|
|
2
2
|
export default _default;
|
package/dist/src/lib/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import StackTab from './StackTabs.vue';
|
|
3
|
-
import IFrame from './iframe.vue';
|
|
4
|
-
import useTabLoading from './hooks/useTabLoading';
|
|
5
|
-
import useTabRouter from './hooks/useTabRouter';
|
|
6
|
-
import useStackTab from './hooks/useStackTab';
|
|
7
|
-
import TabHeaderButton from './components/TabHeader/TabHeaderButton.vue';
|
|
8
|
-
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as StackTab } from './StackTabs.vue';
|
|
3
|
+
import { default as IFrame } from './iframe.vue';
|
|
4
|
+
import { default as useTabLoading } from './hooks/useTabLoading';
|
|
5
|
+
import { default as useTabRouter } from './hooks/useTabRouter';
|
|
6
|
+
import { default as useStackTab } from './hooks/useStackTab';
|
|
7
|
+
import { default as TabHeaderButton } from './components/TabHeader/TabHeaderButton.vue';
|
|
8
|
+
|
|
9
9
|
export * from './model/TabModel';
|
|
10
10
|
declare module '@vue/runtime-core' {
|
|
11
11
|
interface GlobalComponents {
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const _scrollTo: ({ wrap, left, top, smooth }: {
|
|
9
9
|
wrap: HTMLElement | null;
|
|
10
|
-
left?: number
|
|
11
|
-
top?: number
|
|
12
|
-
smooth?: boolean
|
|
10
|
+
left?: number;
|
|
11
|
+
top?: number;
|
|
12
|
+
smooth?: boolean;
|
|
13
13
|
}) => void;
|
|
14
14
|
/**
|
|
15
15
|
* 指定元素滚动到可视区域
|