vue3-router-tab 1.0.2 → 1.0.3

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 (2) hide show
  1. package/lib/index.ts +4 -8
  2. package/package.json +6 -6
package/lib/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { App } from 'vue'
1
+ import type { App, Plugin } from 'vue'
2
2
  import RouterTab from './components/RouterTab.vue'
3
3
  import RouterTabsPinia from './components/RouterTabsPinia.vue'
4
4
  import { routerTabsKey } from './constants'
@@ -9,15 +9,11 @@ import type { RouterTabsContext } from './core/types'
9
9
 
10
10
  export type { TabRecord, TabInput, RouterTabsOptions, CloseTabOptions } from './core/types'
11
11
 
12
- export { routerTabsKey, useRouterTabs, useRouterTabsPiniaPersistence, RouterTabsPinia as RouterTabs, RouterTabsPinia }
12
+ export { routerTabsKey, useRouterTabs, useRouterTabsPiniaPersistence, RouterTabsPinia }
13
13
 
14
14
  import "./scss/index.scss";
15
15
 
16
- export interface RouterTabPlugin {
17
- install(app: App): void
18
- }
19
-
20
- const plugin: RouterTabPlugin = {
16
+ const plugin: Plugin = {
21
17
  install(app: App) {
22
18
  if ((plugin as any)._installed) return
23
19
  ;(plugin as any)._installed = true
@@ -49,4 +45,4 @@ const plugin: RouterTabPlugin = {
49
45
 
50
46
  export default plugin
51
47
 
52
- export { RouterTab }
48
+ export { RouterTab, RouterTabsPinia as RouterTabs }
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "vue3-router-tab",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
7
7
  "lib",
8
8
  "index.d.ts"
9
9
  ],
10
- "main": "dist/vue3-router-tab.umd.cjs",
11
- "module": "dist/vue3-router-tab.js",
10
+ "main": "dist/vue3-router-tab.cjs.js",
11
+ "module": "dist/vue3-router-tab.es.js",
12
12
  "exports": {
13
13
  ".": {
14
14
  "types": "./index.d.ts",
15
- "import": "./dist/vue3-router-tab.js",
16
- "require": "./dist/vue3-router-tab.umd.cjs"
15
+ "import": "./dist/vue3-router-tab.es.js",
16
+ "require": "./dist/vue3-router-tab.cjs.js"
17
17
  },
18
- "./style": "./dist/style.css"
18
+ "./style": "./dist/vue3-router-tab.css"
19
19
  },
20
20
  "scripts": {
21
21
  "build": "vite build"