vue-stack-tabs 1.1.0 → 1.3.1

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.
Files changed (115) hide show
  1. package/README.en.md +526 -0
  2. package/README.md +141 -39
  3. package/README.ru.md +526 -0
  4. package/dist/iframe-bridge.d.ts +8 -0
  5. package/dist/iframe-bridge.html +77 -0
  6. package/dist/iframe-bridge.mjs +20 -0
  7. package/dist/iframe-child.html +19 -6
  8. package/dist/nuxt/favicon.svg +10 -0
  9. package/dist/nuxt/iframe-bridge.html +77 -0
  10. package/dist/nuxt/iframe-child.html +88 -0
  11. package/dist/nuxt/module.d.ts +6 -0
  12. package/dist/nuxt/module.mjs +28 -0
  13. package/dist/nuxt/plugin.mjs +9 -0
  14. package/dist/nuxt/runtime/plugin.d.ts +2 -0
  15. package/dist/nuxt/runtime/plugin.mjs +9 -0
  16. package/dist/src/lib/StackTabs.vue.d.ts +30 -16
  17. package/dist/src/lib/components/ContextMenu/ContextMenuItem.vue.d.ts +7 -1
  18. package/dist/src/lib/components/ContextMenu/index.vue.d.ts +5 -4
  19. package/dist/src/lib/components/PageLoading.vue.d.ts +2 -1
  20. package/dist/src/lib/components/StackKeepAlive/StackCacheRenderer.vue.d.ts +25 -0
  21. package/dist/src/lib/components/StackKeepAlive/StackKeepAlive.vue.d.ts +12 -0
  22. package/dist/src/lib/components/TabHeader/TabHeaderButton.vue.d.ts +11 -12
  23. package/dist/src/lib/components/TabHeader/TabHeaderItem.vue.d.ts +5 -4
  24. package/dist/src/lib/components/TabHeader/TabHeaderScroll.vue.d.ts +8 -22
  25. package/dist/src/lib/components/TabHeader/index.vue.d.ts +11 -164
  26. package/dist/src/lib/hooks/stackTabsContext.d.ts +49 -0
  27. package/dist/src/lib/hooks/tabPanel/evict.d.ts +21 -61
  28. package/dist/src/lib/hooks/tabPanel/navigationTransaction.d.ts +35 -0
  29. package/dist/src/lib/hooks/tabPanel/refresh.d.ts +17 -0
  30. package/dist/src/lib/hooks/tabPanel/scroll.d.ts +8 -8
  31. package/dist/src/lib/hooks/tabPanel/session.d.ts +9 -8
  32. package/dist/src/lib/hooks/tabPanel/state.d.ts +20 -72
  33. package/dist/src/lib/hooks/useIframeManager.d.ts +35 -0
  34. package/dist/src/lib/hooks/useTabActions.d.ts +5 -46
  35. package/dist/src/lib/hooks/useTabEventBus.d.ts +22 -9
  36. package/dist/src/lib/hooks/useTabPanel.d.ts +14 -73
  37. package/dist/src/lib/i18n/index.d.ts +6 -4
  38. package/dist/src/lib/i18n/lang/en.d.ts +5 -0
  39. package/dist/src/lib/i18n/lang/zh-CN.d.ts +5 -0
  40. package/dist/src/lib/i18n/stackTabsLocale.d.ts +2 -0
  41. package/dist/src/lib/iframe-bridge.d.ts +8 -0
  42. package/dist/src/lib/iframe.vue.d.ts +2 -1
  43. package/dist/src/lib/index.d.ts +4 -5
  44. package/dist/src/lib/model/TabModel.d.ts +11 -40
  45. package/dist/src/lib/nuxt/module.d.ts +6 -0
  46. package/dist/src/lib/nuxt/runtime/plugin.client.d.ts +2 -0
  47. package/dist/src/lib/nuxt/runtime/plugin.d.ts +2 -0
  48. package/dist/src/lib/utils/iframeBridge.d.ts +11 -3
  49. package/dist/src/lib/utils/stackTabsA11y.d.ts +8 -0
  50. package/dist/src/lib/utils/stackTabsMessage.d.ts +7 -0
  51. package/dist/src/lib/utils/tabInfoEncoder.d.ts +0 -15
  52. package/dist/src/lib/utils/typeGuards.d.ts +2 -0
  53. package/dist/src/lib/utils/urlParser.d.ts +24 -3
  54. package/dist/src/lib/versionLogger.d.ts +1 -0
  55. package/dist/style.css +2 -1
  56. package/dist/utils/iframeBridge.d.ts +39 -0
  57. package/dist/vue-stack-tabs.css +2 -1
  58. package/dist/vue-stack-tabs.es.js +1 -2220
  59. package/package.json +71 -50
  60. package/src/lib/StackTabs.vue +223 -196
  61. package/src/lib/assets/style/stackTab.scss +110 -13
  62. package/src/lib/components/ContextMenu/ContextMenuItem.vue +23 -11
  63. package/src/lib/components/ContextMenu/index.vue +94 -10
  64. package/src/lib/components/PageLoading.vue +9 -7
  65. package/src/lib/components/StackKeepAlive/StackCacheRenderer.vue +70 -0
  66. package/src/lib/components/StackKeepAlive/StackKeepAlive.vue +57 -0
  67. package/src/lib/components/TabHeader/TabHeaderButton.vue +19 -8
  68. package/src/lib/components/TabHeader/TabHeaderItem.vue +74 -17
  69. package/src/lib/components/TabHeader/TabHeaderScroll.vue +47 -25
  70. package/src/lib/components/TabHeader/index.vue +181 -13
  71. package/src/lib/hooks/stackTabsContext.ts +135 -0
  72. package/src/lib/hooks/tabPanel/evict.ts +122 -87
  73. package/src/lib/hooks/tabPanel/navigationTransaction.ts +61 -0
  74. package/src/lib/hooks/tabPanel/refresh.ts +109 -0
  75. package/src/lib/hooks/tabPanel/scroll.ts +57 -40
  76. package/src/lib/hooks/tabPanel/session.ts +84 -22
  77. package/src/lib/hooks/tabPanel/state.ts +41 -44
  78. package/src/lib/hooks/useIframeManager.ts +253 -0
  79. package/src/lib/hooks/useTabActions.ts +64 -30
  80. package/src/lib/hooks/useTabEventBus.ts +29 -19
  81. package/src/lib/hooks/useTabLoading.ts +3 -2
  82. package/src/lib/hooks/useTabPanel.tsx +290 -313
  83. package/src/lib/hooks/useTabRouter.ts +111 -97
  84. package/src/lib/i18n/index.ts +53 -45
  85. package/src/lib/i18n/lang/en.ts +6 -1
  86. package/src/lib/i18n/lang/zh-CN.ts +6 -1
  87. package/src/lib/i18n/stackTabsLocale.ts +8 -0
  88. package/src/lib/iframe-bridge.ts +12 -0
  89. package/src/lib/index.ts +14 -19
  90. package/src/lib/model/TabModel.ts +27 -82
  91. package/src/lib/nuxt/module.d.ts +4 -0
  92. package/src/lib/nuxt/module.ts +8 -3
  93. package/src/lib/nuxt/runtime/plugin.client.ts +1 -0
  94. package/src/lib/nuxt/runtime/plugin.ts +11 -0
  95. package/src/lib/utils/iframeBridge.ts +29 -5
  96. package/src/lib/utils/scrollUtils.ts +9 -4
  97. package/src/lib/utils/stackTabsA11y.ts +12 -0
  98. package/src/lib/utils/stackTabsMessage.ts +99 -0
  99. package/src/lib/utils/tabInfoEncoder.ts +70 -21
  100. package/src/lib/utils/typeGuards.ts +3 -0
  101. package/src/lib/utils/urlParser.ts +144 -14
  102. package/src/lib/versionLogger.ts +7 -19
  103. package/dist/src/lib/hooks/tabPanel/evict.spec.d.ts +0 -1
  104. package/dist/src/lib/hooks/useTabPanel.spec.d.ts +0 -1
  105. package/dist/src/lib/model/TabModel.spec.d.ts +0 -1
  106. package/dist/src/lib/utils/iframeBridge.spec.d.ts +0 -1
  107. package/dist/src/lib/utils/tabInfoEncoder.spec.d.ts +0 -1
  108. package/dist/src/lib/utils/urlParser.spec.d.ts +0 -1
  109. package/dist/vue-stack-tabs.umd.js +0 -1
  110. package/src/lib/hooks/tabPanel/evict.spec.ts +0 -85
  111. package/src/lib/hooks/useTabPanel.spec.ts +0 -34
  112. package/src/lib/model/TabModel.spec.ts +0 -40
  113. package/src/lib/utils/iframeBridge.spec.ts +0 -37
  114. package/src/lib/utils/tabInfoEncoder.spec.ts +0 -32
  115. package/src/lib/utils/urlParser.spec.ts +0 -45
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg id="_图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 199.49 199.67">
3
+ <path d="M79.24,19.73h108.91v29.7h-108.91v-29.7Z" style="fill: #79a7ff; stroke-width: 0px;"/>
4
+ <path d="M179.24,199.67H20.26C9.05,199.6,0,190.5,0,179.29V20.39C0,9.18,9.05.07,20.26,0h59.49c3.51.07,6.34,2.9,6.41,6.42v44.36c0,3.54-2.87,6.41-6.41,6.41-3.54,0-6.41-2.86-6.42-6.4,0,0,0,0,0,0V12.36H20.25c-4.13.07-7.44,3.44-7.44,7.56v159.41c0,4.13,3.31,7.49,7.44,7.56h158.98c4.13-.07,7.44-3.44,7.44-7.56V51.84c0-3.54,2.87-6.41,6.41-6.42,3.54,0,6.42,2.87,6.42,6.42h0v127.45c0,11.21-9.05,20.32-20.26,20.39h0Z" style="fill: #377dff; stroke-width: 0px;"/>
5
+ <path d="M192.8,60.77c-3.66-.07-6.61-3.02-6.68-6.68v-18.23c.09-4.29-3.32-7.83-7.6-7.92-.05,0-.11,0-.16,0h-96.27c-3.69,0-6.69-2.99-6.69-6.69s2.99-6.69,6.69-6.69h96.27c11.69.08,21.13,9.58,21.13,21.27v18.25c0,3.69-2.99,6.68-6.68,6.68,0,0,0,0,0,0h0Z" style="fill: #377dff; stroke-width: 0px;"/>
6
+ <path d="M193.08,58.67H10.15c-3.61-.08-6.48-3.07-6.41-6.68-.08-3.62,2.79-6.61,6.41-6.69h182.93c3.62.08,6.48,3.08,6.41,6.69.07,3.61-2.79,6.6-6.41,6.68Z" style="fill: #377dff; stroke-width: 0px;"/>
7
+ <path d="M137.2,58.67c-3.42.24-6.4-2.32-6.68-5.74v-28.15c.55-3.69,3.99-6.24,7.69-5.69,2.94.44,5.25,2.75,5.69,5.69v28.15c-.28,3.42-3.26,5.98-6.68,5.74h0Z" style="fill: #377dff; stroke-width: 0px;"/>
8
+ <path d="M99.78,100.48l-12.83-22.22h-18.39l31.22,54.05,31.22-54.05h-18.39l-12.83,22.22Z" style="fill: #00d797; stroke-width: 0px;"/>
9
+ <path d="M135.28,78.26l-35.49,61.43-35.44-61.43h-20.11l55.55,96.2,55.55-96.2h-20.05Z" style="fill: #306fff; stroke-width: 0px;"/>
10
+ </svg>
@@ -0,0 +1,77 @@
1
+ <!doctype html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Iframe Bridge 测试页面</title>
7
+ <style>
8
+ body {
9
+ font-family: system-ui, sans-serif;
10
+ padding: 20px;
11
+ background: #f0f2f5;
12
+ }
13
+ .card {
14
+ background: white;
15
+ padding: 20px;
16
+ border-radius: 8px;
17
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
18
+ }
19
+ button {
20
+ padding: 10px 20px;
21
+ background: #67c23a;
22
+ color: white;
23
+ border: none;
24
+ border-radius: 4px;
25
+ cursor: pointer;
26
+ }
27
+ .status {
28
+ margin-top: 10px;
29
+ color: #606266;
30
+ }
31
+ </style>
32
+ </head>
33
+ <body>
34
+ <div class="card">
35
+ <h2>此页面演示使用封装好的 Bridge 对接方式</h2>
36
+ <p>页面加载时间: <span id="time"></span></p>
37
+ <p>
38
+ 使用 <code>iframeBridge.ts</code> 中提供的 <code>postOpenTab</code> 和
39
+ <code>onRefreshRequest</code>。
40
+ </p>
41
+
42
+ <div style="margin: 20px 0">
43
+ <button id="btnOpen">使用 Bridge 方法请求打开新 Tab</button>
44
+ </div>
45
+ <div class="status" id="status"></div>
46
+ </div>
47
+
48
+ <!-- 注意:在实际项目中,如果是原生 HTML 需要引入编译后的 Bridge 脚本,或者直接使用 type="module" -->
49
+ <script type="module">
50
+ // 这里的导入路径仅为本地调试示意,实际推荐将 Bridge 打包为公共库或 CDN 引用
51
+ import { postOpenTab, onRefreshRequest } from './src/lib/utils/iframeBridge.ts'
52
+
53
+ const timeEl = document.getElementById('time')
54
+ timeEl.innerText = new Date().toLocaleTimeString()
55
+
56
+ // 1. 使用 Bridge 封装的方法打开 Tab
57
+ document.getElementById('btnOpen').onclick = () => {
58
+ postOpenTab({
59
+ id: 'bridge_triggered_tab',
60
+ title: 'Bridge 弹出的新页签',
61
+ path: '/demo/page1',
62
+ closable: true
63
+ })
64
+ }
65
+
66
+ // 2. 使用 Bridge 封装的方法监听刷新请求
67
+ onRefreshRequest(() => {
68
+ console.log('[Bridge Child] Received refresh request from parent')
69
+ const statusEl = document.getElementById('status')
70
+ statusEl.innerText = '正在执行刷新 logic...'
71
+ setTimeout(() => {
72
+ location.reload()
73
+ }, 500)
74
+ })
75
+ </script>
76
+ </body>
77
+ </html>
@@ -0,0 +1,88 @@
1
+ <!doctype html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Iframe 子页面测试</title>
7
+ <style>
8
+ body {
9
+ font-family: system-ui, sans-serif;
10
+ padding: 20px;
11
+ background: #f0f9eb;
12
+ }
13
+ .card {
14
+ background: white;
15
+ padding: 20px;
16
+ border-radius: 8px;
17
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
18
+ }
19
+ button {
20
+ padding: 10px 20px;
21
+ background: #409eff;
22
+ color: white;
23
+ border: none;
24
+ border-radius: 4px;
25
+ cursor: pointer;
26
+ }
27
+ input {
28
+ padding: 8px;
29
+ width: 200px;
30
+ margin-right: 10px;
31
+ border: 1px solid #dcdfe6;
32
+ border-radius: 4px;
33
+ }
34
+ </style>
35
+ </head>
36
+ <body>
37
+ <div class="card">
38
+ <h2>此页面运行在隔离的 iframe 中</h2>
39
+ <p>页面加载时间: <span id="time"></span></p>
40
+ <p>
41
+ 用于测试 iframe 页面的加载、刷新隔离,以及通过 `postMessage` 向外层通信请求打开新 Tab
42
+ 的功能。
43
+ </p>
44
+
45
+ <div style="margin: 20px 0">
46
+ <label>隔离缓存测试输入框:</label>
47
+ <input type="text" id="ipt" placeholder="切走该页签是否会销毁内容?" />
48
+ </div>
49
+
50
+ <div style="margin: 20px 0">
51
+ <button onclick="requestNewTab()">向父级发送 postMessage 请求在外部打开新 Tab</button>
52
+ </div>
53
+ </div>
54
+
55
+ <script>
56
+ const timeEl = document.getElementById('time')
57
+ const updateTime = () => {
58
+ timeEl.innerText = new Date().toLocaleTimeString()
59
+ }
60
+ updateTime()
61
+
62
+ // 1. 原生对接:向父窗口请求打开新标签
63
+ function requestNewTab() {
64
+ window.parent.postMessage(
65
+ {
66
+ type: 'vue-stack-tabs:openTab', // 推荐使用该标准类型,StackTabs 已支持兼容 'openTab'
67
+ payload: {
68
+ id: 'native_triggered_tab',
69
+ title: '原生弹出的新页签',
70
+ path: '/demo/page2',
71
+ closable: true
72
+ }
73
+ },
74
+ '*'
75
+ )
76
+ }
77
+
78
+ // 2. 原生对接:监听父窗口发送的刷新请求
79
+ window.addEventListener('message', (ev) => {
80
+ if (ev.data?.type === 'vue-stack-tabs:refresh') {
81
+ console.log('[Native Child] Received refresh request from parent')
82
+ // 执行刷新逻辑(例如重新加载页面或局部数据更新)
83
+ location.reload()
84
+ }
85
+ })
86
+ </script>
87
+ </body>
88
+ </html>
@@ -0,0 +1,6 @@
1
+ export interface ModuleOptions {
2
+ /** 默认语言 */
3
+ locale?: string;
4
+ }
5
+ declare const _default: import('nuxt/schema').NuxtModule<ModuleOptions, ModuleOptions, false>;
6
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import { addImports as e, addPlugin as t, createResolver as n, defineNuxtModule as r } from "nuxt/kit";
2
+ //#region src/lib/nuxt/module.ts
3
+ var i = r({
4
+ meta: {
5
+ name: "vue-stack-tabs",
6
+ configKey: "vueStackTabs"
7
+ },
8
+ defaults: { locale: "zh-CN" },
9
+ setup(r, i) {
10
+ let { resolve: a } = n(import.meta.url);
11
+ i.options.runtimeConfig.public.vueStackTabs = { locale: r.locale }, t({ src: a("./runtime/plugin") }), e([
12
+ {
13
+ name: "useTabActions",
14
+ from: "vue-stack-tabs"
15
+ },
16
+ {
17
+ name: "useTabRouter",
18
+ from: "vue-stack-tabs"
19
+ },
20
+ {
21
+ name: "useTabLoading",
22
+ from: "vue-stack-tabs"
23
+ }
24
+ ]);
25
+ }
26
+ });
27
+ //#endregion
28
+ export { i as default };
@@ -0,0 +1,9 @@
1
+ import { defineNuxtPlugin as e, useRuntimeConfig as t } from "nuxt/app";
2
+ import n from "vue-stack-tabs";
3
+ //#region src/lib/nuxt/runtime/plugin.ts
4
+ var r = e((e) => {
5
+ let r = t().public.vueStackTabs;
6
+ e.vueApp.use(n, [{ locale: r?.locale ?? "zh-CN" }]);
7
+ });
8
+ //#endregion
9
+ export { r as default };
@@ -0,0 +1,2 @@
1
+ declare const _default: import('nuxt/app').Plugin<Record<string, unknown>> & import('nuxt/app').ObjectPlugin<Record<string, unknown>>;
2
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { defineNuxtPlugin as e, useRuntimeConfig as t } from "nuxt/app";
2
+ import n from "vue-stack-tabs";
3
+ //#region src/lib/nuxt/runtime/plugin.ts
4
+ var r = e((e) => {
5
+ let r = t().public.vueStackTabs;
6
+ e.vueApp.use(n, [{ locale: r?.locale ?? "zh-CN" }]);
7
+ });
8
+ //#endregion
9
+ export { r as default };
@@ -1,5 +1,6 @@
1
- import { TransitionProps, DefineComponent } from 'vue';
1
+ import { TransitionProps } from 'vue';
2
2
  import { ITabData, TabScrollMode } from './model/TabModel';
3
+ type StackTabsIframeReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
3
4
  type __VLS_Props = {
4
5
  defaultTabs?: ITabData[];
5
6
  max?: number;
@@ -15,33 +16,42 @@ type __VLS_Props = {
15
16
  globalScroll?: boolean;
16
17
  iframePath: string;
17
18
  sessionPrefix?: string;
18
- /** 允许通过 postMessage 调用 openTab 的 iframe 来源,默认仅同源 */
19
19
  iframeAllowedOrigins?: string[];
20
+ iframeSandbox?: string;
21
+ iframeReferrerPolicy?: StackTabsIframeReferrerPolicy;
22
+ iframeAllow?: string;
23
+ iframeLoadTimeout?: number;
20
24
  };
21
- declare function __VLS_template(): {
22
- attrs: Partial<{}>;
23
- slots: {
24
- leftButton?(_: {}): any;
25
- rightButton?(_: {}): any;
26
- };
27
- refs: {};
28
- rootEl: HTMLDivElement;
25
+ declare var __VLS_10: {}, __VLS_13: {}, __VLS_34: {
26
+ tab: import('.').ITabItem;
27
+ }, __VLS_36: {
28
+ tab: import('.').ITabItem;
29
+ retry: (frameId: string) => void;
30
+ };
31
+ type __VLS_Slots = {} & {
32
+ leftButton?: (props: typeof __VLS_10) => any;
33
+ } & {
34
+ rightButton?: (props: typeof __VLS_13) => any;
35
+ } & {
36
+ iframeLoading?: (props: typeof __VLS_34) => any;
37
+ } & {
38
+ iframeError?: (props: typeof __VLS_36) => any;
29
39
  };
30
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
31
- declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
40
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
32
41
  onActive: (...args: any[]) => void;
33
42
  onPageLoaded: (...args: any[]) => void;
34
43
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
35
44
  onOnActive?: ((...args: any[]) => any) | undefined;
36
45
  onOnPageLoaded?: ((...args: any[]) => any) | undefined;
37
46
  }>, {
47
+ defaultTabs: ITabData[];
38
48
  max: number;
39
49
  contextmenu: boolean | object;
40
50
  space: number;
41
51
  width: string;
42
52
  tabScrollMode: TabScrollMode;
43
53
  tabTransition: string | TransitionProps;
44
- defaultTabs: ITabData[];
54
+ iframeLoadTimeout: number;
45
55
  pageTransition: string;
46
56
  pageTransitionBack: string;
47
57
  height: string;
@@ -49,10 +59,14 @@ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, impo
49
59
  globalScroll: boolean;
50
60
  sessionPrefix: string;
51
61
  iframeAllowedOrigins: string[];
52
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
53
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
62
+ iframeSandbox: string;
63
+ iframeReferrerPolicy: StackTabsIframeReferrerPolicy;
64
+ iframeAllow: string;
65
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
66
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
67
+ declare const _default: typeof __VLS_export;
54
68
  export default _default;
55
- type __VLS_WithTemplateSlots<T, S> = T & {
69
+ type __VLS_WithSlots<T, S> = T & {
56
70
  new (): {
57
71
  $slots: S;
58
72
  };
@@ -3,6 +3,12 @@ type __VLS_Props = {
3
3
  icon?: string;
4
4
  /** 显示文本 */
5
5
  title: string;
6
+ /** 是否禁用 */
7
+ disabled?: boolean;
6
8
  };
7
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
9
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
10
+ icon: string;
11
+ disabled: boolean;
12
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
8
14
  export default _default;
@@ -4,10 +4,11 @@ type __VLS_Props = {
4
4
  left?: number;
5
5
  top?: number;
6
6
  contextMenu?: Array<IContextMenu>;
7
+ restoreFocusElement?: HTMLElement | null;
7
8
  tabItem: ITabItem;
8
9
  max: number;
9
10
  };
10
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
12
  close: () => any;
12
13
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
13
14
  onClose?: (() => any) | undefined;
@@ -15,7 +16,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
15
16
  left: number;
16
17
  top: number;
17
18
  contextMenu: Array<IContextMenu>;
18
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
19
- menuElementRef: HTMLDivElement;
20
- }, HTMLDivElement>;
19
+ restoreFocusElement: HTMLElement | null;
20
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: typeof __VLS_export;
21
22
  export default _default;
@@ -2,5 +2,6 @@ type __VLS_Props = {
2
2
  /** 当前标签 id,用于过滤 PAGE_LOADING 事件 */
3
3
  tabId: string;
4
4
  };
5
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
6
7
  export default _default;
@@ -0,0 +1,25 @@
1
+ import { DefineComponent, VNode } from 'vue';
2
+ import { RouteLocationNormalizedLoaded } from 'vue-router';
3
+ interface StackCacheRendererProps {
4
+ route: RouteLocationNormalizedLoaded;
5
+ component?: VNode | null;
6
+ }
7
+ interface StackCacheRendererSlotProps {
8
+ wrappedComponent: DefineComponent;
9
+ activeCacheKey: string;
10
+ refreshKey: number;
11
+ activePageRefreshVersion: number;
12
+ component?: VNode | null;
13
+ }
14
+ type __VLS_Slots = {
15
+ default(props: StackCacheRendererSlotProps): unknown;
16
+ };
17
+ declare const __VLS_base: DefineComponent<StackCacheRendererProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StackCacheRendererProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,12 @@
1
+ interface StackKeepAliveProps {
2
+ transitionName?: string;
3
+ }
4
+ declare const __VLS_export: import('vue').DefineComponent<StackKeepAliveProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
+ loaded: () => any;
6
+ }, string, import('vue').PublicProps, Readonly<StackKeepAliveProps> & Readonly<{
7
+ onLoaded?: (() => any) | undefined;
8
+ }>, {
9
+ transitionName: string;
10
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -7,25 +7,24 @@ type __VLS_Props = {
7
7
  iconClass?: string;
8
8
  /** 悬停提示 */
9
9
  title?: string;
10
+ /** 辅助技术标签,未传时使用 title */
11
+ ariaLabel?: string;
10
12
  };
11
- declare function __VLS_template(): {
12
- attrs: Partial<{}>;
13
- slots: {
14
- icon?(_: {}): any;
15
- };
16
- refs: {};
17
- rootEl: HTMLDivElement;
13
+ declare var __VLS_1: {};
14
+ type __VLS_Slots = {} & {
15
+ icon?: (props: typeof __VLS_1) => any;
18
16
  };
19
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
17
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
21
18
  title: string;
22
19
  disabled: boolean;
23
20
  shadow: "left" | "right" | null;
24
21
  iconClass: string;
25
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
26
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
+ ariaLabel: string;
23
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
24
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
+ declare const _default: typeof __VLS_export;
27
26
  export default _default;
28
- type __VLS_WithTemplateSlots<T, S> = T & {
27
+ type __VLS_WithSlots<T, S> = T & {
29
28
  new (): {
30
29
  $slots: S;
31
30
  };
@@ -2,13 +2,14 @@ import { ITabItem } from '../../model/TabModel';
2
2
  type __VLS_Props = {
3
3
  item: ITabItem;
4
4
  };
5
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
6
  active: (...args: any[]) => void;
7
7
  close: (...args: any[]) => void;
8
+ contextmenu: (...args: any[]) => void;
8
9
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
9
10
  onActive?: ((...args: any[]) => any) | undefined;
10
11
  onClose?: ((...args: any[]) => any) | undefined;
11
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
12
- tabElementRef: HTMLLIElement;
13
- }, HTMLLIElement>;
12
+ onContextmenu?: ((...args: any[]) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
14
15
  export default _default;
@@ -6,36 +6,22 @@ type __VLS_Props = {
6
6
  /** 是否显示左右箭头 */
7
7
  isScrollButton?: boolean;
8
8
  };
9
- declare function __VLS_template(): {
10
- attrs: Partial<{}>;
11
- slots: {
12
- default?(_: {}): any;
13
- };
14
- refs: {
15
- headerScroll: HTMLDivElement;
16
- container: HTMLDivElement;
17
- bar: HTMLDivElement;
18
- thumb: HTMLDivElement;
19
- };
20
- rootEl: any;
9
+ declare var __VLS_8: {};
10
+ type __VLS_Slots = {} & {
11
+ default?: (props: typeof __VLS_8) => any;
21
12
  };
22
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
23
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
13
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
24
14
  scrollIntoView: (el: HTMLElement) => void;
25
15
  isInView: (el: HTMLElement) => boolean;
26
16
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
27
17
  space: number;
28
18
  isScrollWheel: boolean;
29
19
  isScrollButton: boolean;
30
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
31
- headerScroll: HTMLDivElement;
32
- container: HTMLDivElement;
33
- bar: HTMLDivElement;
34
- thumb: HTMLDivElement;
35
- }, any>;
36
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
+ declare const _default: typeof __VLS_export;
37
23
  export default _default;
38
- type __VLS_WithTemplateSlots<T, S> = T & {
24
+ type __VLS_WithSlots<T, S> = T & {
39
25
  new (): {
40
26
  $slots: S;
41
27
  };