vft 0.0.466 → 0.0.468
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/dist/index.css +1 -1
- package/es/components/autocomplete/autocomplete.vue.d.ts +2 -2
- package/es/components/autocomplete/index.d.ts +6 -6
- package/es/components/button/index.d.ts +9 -9
- package/es/components/iframe-layout/iframe-page.vue2.js +14 -10
- package/es/components/multiple-tabs/index.d.ts +57 -16
- package/es/components/multiple-tabs/multiple-tabs.vue.d.ts +10 -1
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +108 -84
- package/es/components/multiple-tabs/types.d.ts +1 -0
- package/es/components/popconfirm/index.d.ts +15 -15
- package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/es/components/select/index.d.ts +4 -4
- package/es/components/select/select.vue.d.ts +4 -4
- package/es/components/select/useSelect.d.ts +4 -4
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/autocomplete/autocomplete.vue.d.ts +2 -2
- package/lib/components/autocomplete/index.d.ts +6 -6
- package/lib/components/button/index.d.ts +9 -9
- package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/index.d.ts +57 -16
- package/lib/components/multiple-tabs/multiple-tabs.vue.d.ts +10 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/types.d.ts +1 -0
- package/lib/components/popconfirm/index.d.ts +15 -15
- package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/lib/components/select/index.d.ts +4 -4
- package/lib/components/select/select.vue.d.ts +4 -4
- package/lib/components/select/useSelect.d.ts +4 -4
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +5 -5
- package/theme-style/index.css +1 -1
- package/theme-style/src/common/icon.scss +2 -0
- package/theme-style/src/common/var.scss +3 -3
- package/theme-style/src/multiple-tabs.scss +44 -0
- package/theme-style/src/tabs.scss +0 -7
- package/theme-style/vft-multiple-tabs.css +1 -1
- package/theme-style/vft-tabs.css +1 -1
- package/web-types.json +1 -1
|
@@ -62,9 +62,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
62
62
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
63
63
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
64
64
|
readonly effect?: "light" | "dark" | undefined;
|
|
65
|
-
readonly visible?: boolean | null | undefined;
|
|
66
65
|
readonly teleported?: boolean | undefined;
|
|
67
66
|
readonly open?: boolean | undefined;
|
|
67
|
+
readonly visible?: boolean | null | undefined;
|
|
68
68
|
readonly trigger?: import("vft/es/components/tooltip").TooltipTriggerType | undefined;
|
|
69
69
|
readonly arrowOffset?: number | undefined;
|
|
70
70
|
readonly gpuAcceleration?: boolean | undefined;
|
|
@@ -480,9 +480,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
480
480
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
481
481
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
482
482
|
readonly effect?: "light" | "dark" | undefined;
|
|
483
|
-
readonly visible?: boolean | null | undefined;
|
|
484
483
|
readonly teleported?: boolean | undefined;
|
|
485
484
|
readonly open?: boolean | undefined;
|
|
485
|
+
readonly visible?: boolean | null | undefined;
|
|
486
486
|
readonly trigger?: import("vft/es/components/tooltip").TooltipTriggerType | undefined;
|
|
487
487
|
readonly arrowOffset?: number | undefined;
|
|
488
488
|
readonly gpuAcceleration?: boolean | undefined;
|
|
@@ -85,9 +85,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
85
85
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
86
86
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
87
87
|
readonly effect?: "light" | "dark" | undefined;
|
|
88
|
-
readonly visible?: boolean | null | undefined;
|
|
89
88
|
readonly teleported?: boolean | undefined;
|
|
90
89
|
readonly open?: boolean | undefined;
|
|
90
|
+
readonly visible?: boolean | null | undefined;
|
|
91
91
|
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
92
92
|
readonly arrowOffset?: number | undefined;
|
|
93
93
|
readonly gpuAcceleration?: boolean | undefined;
|
|
@@ -503,9 +503,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
503
503
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
504
504
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
505
505
|
readonly effect?: "light" | "dark" | undefined;
|
|
506
|
-
readonly visible?: boolean | null | undefined;
|
|
507
506
|
readonly teleported?: boolean | undefined;
|
|
508
507
|
readonly open?: boolean | undefined;
|
|
508
|
+
readonly visible?: boolean | null | undefined;
|
|
509
509
|
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
510
510
|
readonly arrowOffset?: number | undefined;
|
|
511
511
|
readonly gpuAcceleration?: boolean | undefined;
|
|
@@ -1006,9 +1006,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
1006
1006
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
1007
1007
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
1008
1008
|
readonly effect?: "light" | "dark" | undefined;
|
|
1009
|
-
readonly visible?: boolean | null | undefined;
|
|
1010
1009
|
readonly teleported?: boolean | undefined;
|
|
1011
1010
|
readonly open?: boolean | undefined;
|
|
1011
|
+
readonly visible?: boolean | null | undefined;
|
|
1012
1012
|
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
1013
1013
|
readonly arrowOffset?: number | undefined;
|
|
1014
1014
|
readonly gpuAcceleration?: boolean | undefined;
|
|
@@ -1424,9 +1424,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
1424
1424
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
1425
1425
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
1426
1426
|
readonly effect?: "light" | "dark" | undefined;
|
|
1427
|
-
readonly visible?: boolean | null | undefined;
|
|
1428
1427
|
readonly teleported?: boolean | undefined;
|
|
1429
1428
|
readonly open?: boolean | undefined;
|
|
1429
|
+
readonly visible?: boolean | null | undefined;
|
|
1430
1430
|
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
1431
1431
|
readonly arrowOffset?: number | undefined;
|
|
1432
1432
|
readonly gpuAcceleration?: boolean | undefined;
|
|
@@ -1916,9 +1916,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
1916
1916
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
1917
1917
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
1918
1918
|
readonly effect?: "light" | "dark" | undefined;
|
|
1919
|
-
readonly visible?: boolean | null | undefined;
|
|
1920
1919
|
readonly teleported?: boolean | undefined;
|
|
1921
1920
|
readonly open?: boolean | undefined;
|
|
1921
|
+
readonly visible?: boolean | null | undefined;
|
|
1922
1922
|
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
1923
1923
|
readonly arrowOffset?: number | undefined;
|
|
1924
1924
|
readonly gpuAcceleration?: boolean | undefined;
|
|
@@ -2334,9 +2334,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
2334
2334
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
2335
2335
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
2336
2336
|
readonly effect?: "light" | "dark" | undefined;
|
|
2337
|
-
readonly visible?: boolean | null | undefined;
|
|
2338
2337
|
readonly teleported?: boolean | undefined;
|
|
2339
2338
|
readonly open?: boolean | undefined;
|
|
2339
|
+
readonly visible?: boolean | null | undefined;
|
|
2340
2340
|
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
2341
2341
|
readonly arrowOffset?: number | undefined;
|
|
2342
2342
|
readonly gpuAcceleration?: boolean | undefined;
|
|
@@ -24,12 +24,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
24
24
|
autofocus: {
|
|
25
25
|
type: import("vue").PropType<boolean>;
|
|
26
26
|
};
|
|
27
|
-
icon: {
|
|
28
|
-
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
29
|
-
};
|
|
30
27
|
dark: {
|
|
31
28
|
type: import("vue").PropType<boolean>;
|
|
32
29
|
};
|
|
30
|
+
icon: {
|
|
31
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
32
|
+
};
|
|
33
33
|
loading: {
|
|
34
34
|
type: import("vue").PropType<boolean>;
|
|
35
35
|
};
|
|
@@ -114,12 +114,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
114
114
|
autofocus: {
|
|
115
115
|
type: import("vue").PropType<boolean>;
|
|
116
116
|
};
|
|
117
|
-
icon: {
|
|
118
|
-
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
119
|
-
};
|
|
120
117
|
dark: {
|
|
121
118
|
type: import("vue").PropType<boolean>;
|
|
122
119
|
};
|
|
120
|
+
icon: {
|
|
121
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
122
|
+
};
|
|
123
123
|
loading: {
|
|
124
124
|
type: import("vue").PropType<boolean>;
|
|
125
125
|
};
|
|
@@ -199,12 +199,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
199
199
|
autofocus: {
|
|
200
200
|
type: import("vue").PropType<boolean>;
|
|
201
201
|
};
|
|
202
|
-
icon: {
|
|
203
|
-
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
204
|
-
};
|
|
205
202
|
dark: {
|
|
206
203
|
type: import("vue").PropType<boolean>;
|
|
207
204
|
};
|
|
205
|
+
icon: {
|
|
206
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
207
|
+
};
|
|
208
208
|
loading: {
|
|
209
209
|
type: import("vue").PropType<boolean>;
|
|
210
210
|
};
|
|
@@ -1,28 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as o, createElementBlock as a, openBlock as t, normalizeClass as n, unref as i } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import "../config-provider/hooks/use-global-config.js";
|
|
5
5
|
import "lodash-es";
|
|
6
6
|
import "../form/index.js";
|
|
7
|
-
import { useNamespace as
|
|
7
|
+
import { useNamespace as l } from "../../hooks/use-namespace/index.js";
|
|
8
8
|
import "../../hooks/use-model-toggle/index.js";
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import "../../hooks/use-z-index/index.js";
|
|
11
|
-
const
|
|
11
|
+
const m = ["src"], s = o({
|
|
12
12
|
name: "vft-iframe-page"
|
|
13
|
-
}),
|
|
14
|
-
...
|
|
13
|
+
}), y = /* @__PURE__ */ o({
|
|
14
|
+
...s,
|
|
15
15
|
props: {
|
|
16
16
|
frameSrc: { default: "" }
|
|
17
17
|
},
|
|
18
18
|
setup(r) {
|
|
19
|
-
const
|
|
20
|
-
return (
|
|
21
|
-
|
|
19
|
+
const e = l("iframe-page");
|
|
20
|
+
return (p, c) => (t(), a("iframe", {
|
|
21
|
+
sandbox: "allow-scripts allow-same-origin allow-top-navigation allow-modals allow-forms allow-top-navigation-by-user-activation",
|
|
22
|
+
referrerPolicy: "no-referrer-when-downgrade",
|
|
23
|
+
frameborder: "0",
|
|
24
|
+
style: { border: "none", outline: "none" },
|
|
25
|
+
class: n(i(e).b()),
|
|
22
26
|
src: r.frameSrc
|
|
23
|
-
}, null, 10,
|
|
27
|
+
}, null, 10, m));
|
|
24
28
|
}
|
|
25
29
|
});
|
|
26
30
|
export {
|
|
27
|
-
|
|
31
|
+
y as default
|
|
28
32
|
};
|
|
@@ -1,4 +1,54 @@
|
|
|
1
|
-
export declare const VftMultipleTabs: import("vft/es/utils").SFCWithInstall<
|
|
1
|
+
export declare const VftMultipleTabs: import("vft/es/utils").SFCWithInstall<{
|
|
2
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
3
|
+
tabsStyle: {
|
|
4
|
+
type: import("vue").PropType<Record<string, string | number>>;
|
|
5
|
+
};
|
|
6
|
+
contextMenuStyle: {
|
|
7
|
+
type: import("vue").PropType<Record<string, string | number>>;
|
|
8
|
+
};
|
|
9
|
+
canDrag: {
|
|
10
|
+
type: import("vue").PropType<boolean>;
|
|
11
|
+
};
|
|
12
|
+
showNavRight: {
|
|
13
|
+
type: import("vue").PropType<boolean>;
|
|
14
|
+
};
|
|
15
|
+
fixTabCount: {
|
|
16
|
+
type: import("vue").PropType<number>;
|
|
17
|
+
};
|
|
18
|
+
fixExtraScrollWidth: {
|
|
19
|
+
type: import("vue").PropType<number>;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
22
|
+
P: {};
|
|
23
|
+
B: {};
|
|
24
|
+
D: {};
|
|
25
|
+
C: {};
|
|
26
|
+
M: {};
|
|
27
|
+
Defaults: {};
|
|
28
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
tabsStyle: {
|
|
30
|
+
type: import("vue").PropType<Record<string, string | number>>;
|
|
31
|
+
};
|
|
32
|
+
contextMenuStyle: {
|
|
33
|
+
type: import("vue").PropType<Record<string, string | number>>;
|
|
34
|
+
};
|
|
35
|
+
canDrag: {
|
|
36
|
+
type: import("vue").PropType<boolean>;
|
|
37
|
+
};
|
|
38
|
+
showNavRight: {
|
|
39
|
+
type: import("vue").PropType<boolean>;
|
|
40
|
+
};
|
|
41
|
+
fixTabCount: {
|
|
42
|
+
type: import("vue").PropType<number>;
|
|
43
|
+
};
|
|
44
|
+
fixExtraScrollWidth: {
|
|
45
|
+
type: import("vue").PropType<number>;
|
|
46
|
+
};
|
|
47
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
48
|
+
__isFragment?: never;
|
|
49
|
+
__isTeleport?: never;
|
|
50
|
+
__isSuspense?: never;
|
|
51
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
2
52
|
tabsStyle: {
|
|
3
53
|
type: import("vue").PropType<Record<string, string | number>>;
|
|
4
54
|
};
|
|
@@ -8,20 +58,7 @@ export declare const VftMultipleTabs: import("vft/es/utils").SFCWithInstall<impo
|
|
|
8
58
|
canDrag: {
|
|
9
59
|
type: import("vue").PropType<boolean>;
|
|
10
60
|
};
|
|
11
|
-
|
|
12
|
-
type: import("vue").PropType<number>;
|
|
13
|
-
};
|
|
14
|
-
fixExtraScrollWidth: {
|
|
15
|
-
type: import("vue").PropType<number>;
|
|
16
|
-
};
|
|
17
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
-
tabsStyle: {
|
|
19
|
-
type: import("vue").PropType<Record<string, string | number>>;
|
|
20
|
-
};
|
|
21
|
-
contextMenuStyle: {
|
|
22
|
-
type: import("vue").PropType<Record<string, string | number>>;
|
|
23
|
-
};
|
|
24
|
-
canDrag: {
|
|
61
|
+
showNavRight: {
|
|
25
62
|
type: import("vue").PropType<boolean>;
|
|
26
63
|
};
|
|
27
64
|
fixTabCount: {
|
|
@@ -30,7 +67,11 @@ export declare const VftMultipleTabs: import("vft/es/utils").SFCWithInstall<impo
|
|
|
30
67
|
fixExtraScrollWidth: {
|
|
31
68
|
type: import("vue").PropType<number>;
|
|
32
69
|
};
|
|
33
|
-
}>> & Readonly<{}>, {}, {}, {}, {},
|
|
70
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
71
|
+
$slots: {
|
|
72
|
+
"nav-right"?(_: {}): any;
|
|
73
|
+
};
|
|
74
|
+
})> & Record<string, any>;
|
|
34
75
|
export default VftMultipleTabs;
|
|
35
76
|
export * from './types';
|
|
36
77
|
export * from './use';
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { MultipleTabsProps } from './types';
|
|
2
|
-
declare
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
"nav-right"?(_: {}): any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<MultipleTabsProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<MultipleTabsProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
3
7
|
export default _default;
|
|
4
8
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
5
9
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -10,3 +14,8 @@ type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
10
14
|
required: true;
|
|
11
15
|
};
|
|
12
16
|
};
|
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -1,76 +1,77 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftTabs as
|
|
3
|
-
import { isClient as
|
|
1
|
+
import { defineComponent as _, getCurrentInstance as z, ref as b, computed as S, watchEffect as D, unref as t, onMounted as H, resolveComponent as K, createElementBlock as k, openBlock as p, normalizeStyle as U, normalizeClass as P, createVNode as x, createSlots as W, withCtx as g, Fragment as j, renderList as q, createBlock as G, renderSlot as J, createElementVNode as O } from "vue";
|
|
2
|
+
import { VftTabs as Q, VftTabPane as X } from "../tabs/index.js";
|
|
3
|
+
import { isClient as Y } from "@vueuse/core";
|
|
4
4
|
import "@vft/utils";
|
|
5
5
|
import { addUnit as o } from "../../utils/helper.js";
|
|
6
|
-
import { generateCssVars as
|
|
6
|
+
import { generateCssVars as w } from "../../utils/ns-cover.js";
|
|
7
7
|
import "lodash-es";
|
|
8
8
|
import "../form/index.js";
|
|
9
|
-
import { useNamespace as
|
|
9
|
+
import { useNamespace as Z } from "../../hooks/use-namespace/index.js";
|
|
10
10
|
import "../../hooks/use-model-toggle/index.js";
|
|
11
11
|
import "@popperjs/core";
|
|
12
12
|
import "../../hooks/use-z-index/index.js";
|
|
13
|
-
import { useRouterHelper as
|
|
14
|
-
import { useMultipleTabStore as
|
|
15
|
-
import { useRefs as
|
|
16
|
-
import
|
|
17
|
-
import { onBeforeRouteLeave as
|
|
18
|
-
import
|
|
19
|
-
import { initAffixTabs as
|
|
13
|
+
import { useRouterHelper as ee, getRouterKeyPath as v, listenerRouteChange as te } from "@vft/router";
|
|
14
|
+
import { useMultipleTabStore as ne, useTabs as oe } from "@vft/store";
|
|
15
|
+
import { useRefs as ae } from "@vft/use";
|
|
16
|
+
import ie from "hotkeys-js";
|
|
17
|
+
import { onBeforeRouteLeave as le } from "vue-router";
|
|
18
|
+
import re from "./tab-content.vue2.js";
|
|
19
|
+
import { initAffixTabs as se, useTabsDrag as ce } from "./use/use-multiple-tabs.js";
|
|
20
20
|
import "../context-menu/context-menu.vue2.js";
|
|
21
21
|
import "../icon/index.js";
|
|
22
|
-
const
|
|
22
|
+
const ue = _({
|
|
23
23
|
name: "vft-multiple-tabs"
|
|
24
|
-
}),
|
|
25
|
-
...
|
|
24
|
+
}), Ne = /* @__PURE__ */ _({
|
|
25
|
+
...ue,
|
|
26
26
|
props: {
|
|
27
27
|
tabsStyle: {},
|
|
28
28
|
contextMenuStyle: {},
|
|
29
29
|
canDrag: { type: Boolean },
|
|
30
|
+
showNavRight: { type: Boolean, default: !0 },
|
|
30
31
|
fixTabCount: {},
|
|
31
32
|
fixExtraScrollWidth: {}
|
|
32
33
|
},
|
|
33
|
-
setup(
|
|
34
|
-
const
|
|
35
|
-
|
|
34
|
+
setup(c) {
|
|
35
|
+
const T = Z("multiple-tabs"), u = z().appContext.config.globalProperties.$router, f = se(u), s = ne(), i = b(""), l = b(0), h = b(), { go: R } = ee(u), d = S(() => s.getTabList.filter((e) => !e.meta?.hideTab));
|
|
36
|
+
D(() => {
|
|
36
37
|
if (i.value) {
|
|
37
|
-
const e =
|
|
38
|
-
e === -1 ?
|
|
38
|
+
const e = d.value.findIndex((n) => v(n) === i.value);
|
|
39
|
+
e === -1 ? l.value = d.value?.length - 1 : l.value = e, l.value = l.value < f?.length ? f?.length - 1 : l.value;
|
|
39
40
|
}
|
|
40
|
-
}),
|
|
41
|
-
|
|
42
|
-
}),
|
|
41
|
+
}), Y && le(() => {
|
|
42
|
+
h.value = t(u.currentRoute);
|
|
43
|
+
}), te(({ route: e }) => {
|
|
43
44
|
if (!e || e.meta?.hasTokenToRoot)
|
|
44
45
|
return;
|
|
45
|
-
const { meta:
|
|
46
|
-
if (i.value !==
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
const { meta: n = {} } = e, { currentActivePath: a, hideTab: r } = n, m = r ? a : null, y = v(e);
|
|
47
|
+
if (i.value !== y && (i.value = y), m) {
|
|
48
|
+
const C = u.getRoutes().find((I) => I.path === a);
|
|
49
|
+
C && s.addTab(
|
|
50
|
+
C,
|
|
51
|
+
t(h),
|
|
52
|
+
l.value,
|
|
52
53
|
e
|
|
53
54
|
);
|
|
54
55
|
} else
|
|
55
|
-
|
|
56
|
+
s.addTab(t(e), t(h), l.value);
|
|
56
57
|
});
|
|
57
|
-
function
|
|
58
|
+
function V(e) {
|
|
58
59
|
if (i.value === e.paneName)
|
|
59
60
|
return;
|
|
60
|
-
const
|
|
61
|
+
const n = d.value[e.attrs.index];
|
|
61
62
|
i.value = e.paneName;
|
|
62
|
-
const
|
|
63
|
-
|
|
63
|
+
const a = n?.meta?.hideActiveRoute?.fullPath;
|
|
64
|
+
R(a || n.fullPath || n.path);
|
|
64
65
|
}
|
|
65
|
-
function w(e) {
|
|
66
|
-
m.closeTabByKey(e, s);
|
|
67
|
-
}
|
|
68
|
-
const { refs: M, setRefs: V } = Z();
|
|
69
66
|
function $(e) {
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
s.closeTabByKey(e, u);
|
|
68
|
+
}
|
|
69
|
+
const { refs: B, setRefs: M } = ae();
|
|
70
|
+
function N(e) {
|
|
71
|
+
const n = e.pane.attrs.index, a = e.event;
|
|
72
|
+
B.value[n].handleContext(a);
|
|
72
73
|
}
|
|
73
|
-
const
|
|
74
|
+
const E = S(() => {
|
|
74
75
|
const e = {
|
|
75
76
|
padding: "4px 0 0",
|
|
76
77
|
"border-bottom": "none",
|
|
@@ -85,57 +86,80 @@ const ie = P({
|
|
|
85
86
|
"item-border-radius": `${o(5)} ${o(5)} 0 0`,
|
|
86
87
|
"item-border": "none"
|
|
87
88
|
};
|
|
88
|
-
return { ...
|
|
89
|
-
}), { closeCurrent:
|
|
90
|
-
...
|
|
89
|
+
return { ...w(e, "tabs"), ...c.tabsStyle };
|
|
90
|
+
}), { closeCurrent: L } = oe(), A = {
|
|
91
|
+
...w(
|
|
91
92
|
{
|
|
92
93
|
"sub-item-height": o(40),
|
|
93
94
|
"item-min-width": o(150)
|
|
94
95
|
},
|
|
95
96
|
"menu"
|
|
96
97
|
),
|
|
97
|
-
...
|
|
98
|
+
...c.contextMenuStyle
|
|
99
|
+
}, F = () => {
|
|
100
|
+
s.toggleFullScreen(s.getTabList[l.value], u);
|
|
98
101
|
};
|
|
99
|
-
return
|
|
100
|
-
|
|
101
|
-
}), (e,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
102
|
+
return H(() => {
|
|
103
|
+
c.canDrag && ce(f), ie("command+e, ctrl+e", () => (L(), !1));
|
|
104
|
+
}), (e, n) => {
|
|
105
|
+
const a = K("vft-icon");
|
|
106
|
+
return p(), k("div", {
|
|
107
|
+
class: P(t(T).b()),
|
|
108
|
+
style: U(E.value)
|
|
109
|
+
}, [
|
|
110
|
+
x(t(Q), {
|
|
111
|
+
"show-bar": !1,
|
|
112
|
+
"fix-tab-count": c.fixTabCount,
|
|
113
|
+
"fix-extra-scroll-width": c.fixExtraScrollWidth,
|
|
114
|
+
modelValue: i.value,
|
|
115
|
+
"onUpdate:modelValue": n[0] || (n[0] = (r) => i.value = r),
|
|
116
|
+
onTabClick: V,
|
|
117
|
+
onTabRemove: $,
|
|
118
|
+
onTabContextMenu: N
|
|
119
|
+
}, W({
|
|
120
|
+
default: g(() => [
|
|
121
|
+
(p(!0), k(j, null, q(d.value, (r, m) => (p(), G(t(X), {
|
|
122
|
+
key: t(v)(r) + m,
|
|
123
|
+
closable: !r.meta?.affix,
|
|
124
|
+
index: m,
|
|
125
|
+
name: t(v)(r)
|
|
126
|
+
}, {
|
|
127
|
+
label: g(() => [
|
|
128
|
+
x(re, {
|
|
129
|
+
"context-menu-style": A,
|
|
130
|
+
"affix-num": t(f)?.length,
|
|
131
|
+
ref_for: !0,
|
|
132
|
+
ref: t(M)(m),
|
|
133
|
+
"tab-item": r
|
|
134
|
+
}, null, 8, ["affix-num", "tab-item"])
|
|
135
|
+
]),
|
|
136
|
+
_: 2
|
|
137
|
+
}, 1032, ["closable", "index", "name"]))), 128))
|
|
138
|
+
]),
|
|
139
|
+
_: 2
|
|
140
|
+
}, [
|
|
141
|
+
c.showNavRight ? {
|
|
142
|
+
name: "navRight",
|
|
143
|
+
fn: g(() => [
|
|
144
|
+
J(e.$slots, "nav-right", {}, () => [
|
|
145
|
+
O("div", {
|
|
146
|
+
class: P(t(T).e("nav-right"))
|
|
147
|
+
}, [
|
|
148
|
+
x(a, {
|
|
149
|
+
onClick: F,
|
|
150
|
+
icon: t(s).isFullScreen ? "icon-collapse" : "icon-expand",
|
|
151
|
+
pointer: ""
|
|
152
|
+
}, null, 8, ["icon"])
|
|
153
|
+
], 2)
|
|
154
|
+
])
|
|
130
155
|
]),
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
]),
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
], 6));
|
|
156
|
+
key: "0"
|
|
157
|
+
} : void 0
|
|
158
|
+
]), 1032, ["fix-tab-count", "fix-extra-scroll-width", "modelValue"])
|
|
159
|
+
], 6);
|
|
160
|
+
};
|
|
137
161
|
}
|
|
138
162
|
});
|
|
139
163
|
export {
|
|
140
|
-
|
|
164
|
+
Ne as default
|
|
141
165
|
};
|
|
@@ -7,14 +7,14 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
7
7
|
type: import("vue").PropType<string | number>;
|
|
8
8
|
default: number;
|
|
9
9
|
};
|
|
10
|
-
icon: {
|
|
11
|
-
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
12
|
-
default: string;
|
|
13
|
-
};
|
|
14
10
|
teleported: {
|
|
15
11
|
type: import("vue").PropType<boolean>;
|
|
16
12
|
default: boolean;
|
|
17
13
|
};
|
|
14
|
+
icon: {
|
|
15
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
18
|
hideAfter: {
|
|
19
19
|
type: import("vue").PropType<number>;
|
|
20
20
|
default: number;
|
|
@@ -52,8 +52,8 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
52
52
|
cancel: (val: MouseEvent) => void;
|
|
53
53
|
}, import("vue").PublicProps, {
|
|
54
54
|
width: string | number;
|
|
55
|
-
icon: string | import("vft/es/vft").IconProps;
|
|
56
55
|
teleported: boolean;
|
|
56
|
+
icon: string | import("vft/es/vft").IconProps;
|
|
57
57
|
hideAfter: number;
|
|
58
58
|
persistent: boolean;
|
|
59
59
|
confirmButtonType: import("vft/es/vft").ButtonType;
|
|
@@ -74,14 +74,14 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
74
74
|
type: import("vue").PropType<string | number>;
|
|
75
75
|
default: number;
|
|
76
76
|
};
|
|
77
|
-
icon: {
|
|
78
|
-
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
79
|
-
default: string;
|
|
80
|
-
};
|
|
81
77
|
teleported: {
|
|
82
78
|
type: import("vue").PropType<boolean>;
|
|
83
79
|
default: boolean;
|
|
84
80
|
};
|
|
81
|
+
icon: {
|
|
82
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
83
|
+
default: string;
|
|
84
|
+
};
|
|
85
85
|
hideAfter: {
|
|
86
86
|
type: import("vue").PropType<number>;
|
|
87
87
|
default: number;
|
|
@@ -116,8 +116,8 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
116
116
|
onConfirm?: ((val: MouseEvent) => any) | undefined;
|
|
117
117
|
}>, {}, {}, {}, {}, {
|
|
118
118
|
width: string | number;
|
|
119
|
-
icon: string | import("vft/es/vft").IconProps;
|
|
120
119
|
teleported: boolean;
|
|
120
|
+
icon: string | import("vft/es/vft").IconProps;
|
|
121
121
|
hideAfter: number;
|
|
122
122
|
persistent: boolean;
|
|
123
123
|
confirmButtonType: import("vft/es/vft").ButtonType;
|
|
@@ -135,14 +135,14 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
135
135
|
type: import("vue").PropType<string | number>;
|
|
136
136
|
default: number;
|
|
137
137
|
};
|
|
138
|
-
icon: {
|
|
139
|
-
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
140
|
-
default: string;
|
|
141
|
-
};
|
|
142
138
|
teleported: {
|
|
143
139
|
type: import("vue").PropType<boolean>;
|
|
144
140
|
default: boolean;
|
|
145
141
|
};
|
|
142
|
+
icon: {
|
|
143
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
144
|
+
default: string;
|
|
145
|
+
};
|
|
146
146
|
hideAfter: {
|
|
147
147
|
type: import("vue").PropType<number>;
|
|
148
148
|
default: number;
|
|
@@ -180,8 +180,8 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
180
180
|
cancel: (val: MouseEvent) => void;
|
|
181
181
|
}, string, {
|
|
182
182
|
width: string | number;
|
|
183
|
-
icon: string | import("vft/es/vft").IconProps;
|
|
184
183
|
teleported: boolean;
|
|
184
|
+
icon: string | import("vft/es/vft").IconProps;
|
|
185
185
|
hideAfter: number;
|
|
186
186
|
persistent: boolean;
|
|
187
187
|
confirmButtonType: import("vft/es/vft").ButtonType;
|
|
@@ -43,8 +43,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
43
43
|
onConfirm?: ((val: MouseEvent) => any) | undefined;
|
|
44
44
|
}>, {
|
|
45
45
|
width: string | number;
|
|
46
|
-
icon: string | IconProps;
|
|
47
46
|
teleported: boolean;
|
|
47
|
+
icon: string | IconProps;
|
|
48
48
|
hideAfter: number;
|
|
49
49
|
persistent: boolean;
|
|
50
50
|
confirmButtonType: ButtonType;
|