vue-stack-tabs 0.1.10 → 0.1.12
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/vue-stack-tabs.es.js +308 -306
- package/dist/vue-stack-tabs.umd.js +10 -10
- package/package.json +1 -1
- package/src/lib/hooks/useTabpanel.tsx +8 -7
- package/src/lib/index.ts +2 -1
- package/types/src/lib/index.d.ts +3 -1
package/package.json
CHANGED
|
@@ -30,25 +30,26 @@ export default () => {
|
|
|
30
30
|
// add default tabs
|
|
31
31
|
defaultTabs.splice(0)
|
|
32
32
|
for (const item of staticTabs) {
|
|
33
|
-
const id = ulid()
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
33
|
+
// const id = ulid()
|
|
34
|
+
const fullItem = defu(item, { id:ulid() })
|
|
35
|
+
const __tab = encodeTabInfo(fullItem)
|
|
36
|
+
const uri = uriDecode(fullItem.path)
|
|
37
|
+
const config = defu(fullItem, {
|
|
37
38
|
closable: true,
|
|
38
39
|
refreshable: true,
|
|
39
40
|
iframe: false
|
|
40
41
|
})
|
|
41
|
-
const cacheName = createPageId(id, uri.path, uri.query)
|
|
42
|
+
const cacheName = createPageId(fullItem.id, uri.path, uri.query)
|
|
42
43
|
const page: ITabPage = {
|
|
43
44
|
id: cacheName,
|
|
44
|
-
tabId: id,
|
|
45
|
+
tabId: fullItem.id,
|
|
45
46
|
path: uri.path,
|
|
46
47
|
query: defu(uri.query, { __tab })
|
|
47
48
|
}
|
|
48
49
|
const pages = new Stack<ITabPage>()
|
|
49
50
|
pages.push(page)
|
|
50
51
|
const tab: ITabItem = {
|
|
51
|
-
id,
|
|
52
|
+
id:fullItem.id,
|
|
52
53
|
title: config.title,
|
|
53
54
|
closable: config.closable,
|
|
54
55
|
refreshable: config.refreshable,
|
package/src/lib/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ import IFrame from './iframe.vue'
|
|
|
6
6
|
import useTabLoading from './hooks/useTabLoading'
|
|
7
7
|
import useTabRouter from './hooks/useTabRouter'
|
|
8
8
|
import useStackTab from './hooks/useStackTab'
|
|
9
|
+
import TabHeaderButton from '@/lib/components/TabHeader/TabHeaderButton.vue'
|
|
9
10
|
import './assets/style/index.scss'
|
|
10
11
|
const i18n = createI18n({
|
|
11
12
|
legacy: false,
|
|
@@ -14,7 +15,7 @@ const i18n = createI18n({
|
|
|
14
15
|
})
|
|
15
16
|
|
|
16
17
|
export * from './model/TabModel'
|
|
17
|
-
export { IFrame, useTabLoading, useTabRouter, useStackTab }
|
|
18
|
+
export { IFrame, useTabLoading, useTabRouter, useStackTab,TabHeaderButton,StackTab }
|
|
18
19
|
export default {
|
|
19
20
|
install(Vue: App): void {
|
|
20
21
|
tabVersion(import.meta.env.PACKAGE_VERSION)
|
package/types/src/lib/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { App } from 'vue';
|
|
2
|
+
import StackTab from './StackTabs.vue';
|
|
2
3
|
import IFrame from './iframe.vue';
|
|
3
4
|
import useTabLoading from './hooks/useTabLoading';
|
|
4
5
|
import useTabRouter from './hooks/useTabRouter';
|
|
5
6
|
import useStackTab from './hooks/useStackTab';
|
|
7
|
+
import TabHeaderButton from './components/TabHeader/TabHeaderButton.vue';
|
|
6
8
|
import './assets/style/index.scss';
|
|
7
9
|
export * from './model/TabModel';
|
|
8
|
-
export { IFrame, useTabLoading, useTabRouter, useStackTab };
|
|
10
|
+
export { IFrame, useTabLoading, useTabRouter, useStackTab, TabHeaderButton, StackTab };
|
|
9
11
|
declare const _default: {
|
|
10
12
|
install(Vue: App): void;
|
|
11
13
|
};
|