vue-stack-tabs 0.1.10 → 0.1.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-stack-tabs",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "Vue.js component for router tab.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -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 __tab = encodeTabInfo(defu(item, { id }))
35
- const uri = uriDecode(item.path)
36
- const config = defu(item, {
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
@@ -14,7 +14,7 @@ const i18n = createI18n({
14
14
  })
15
15
 
16
16
  export * from './model/TabModel'
17
- export { IFrame, useTabLoading, useTabRouter, useStackTab }
17
+ export { IFrame, useTabLoading, useTabRouter, useStackTab,StackTab }
18
18
  export default {
19
19
  install(Vue: App): void {
20
20
  tabVersion(import.meta.env.PACKAGE_VERSION)
@@ -1,11 +1,12 @@
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';
6
7
  import './assets/style/index.scss';
7
8
  export * from './model/TabModel';
8
- export { IFrame, useTabLoading, useTabRouter, useStackTab };
9
+ export { IFrame, useTabLoading, useTabRouter, useStackTab, StackTab };
9
10
  declare const _default: {
10
11
  install(Vue: App): void;
11
12
  };