-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: installable & directly usable components
- Loading branch information
1 parent
6e8c747
commit 102311b
Showing
2 changed files
with
19 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,2 @@ | ||
import { App as Application, Plugin } from 'vue'; | ||
import VMap from './components/VMap.vue'; | ||
import { setVueInstance } from './utils/config/index'; | ||
|
||
let installed: boolean = false; | ||
|
||
const install: Exclude<Plugin['install'], undefined> = ( | ||
instance: Application, | ||
) => { | ||
if (!installed) { | ||
setVueInstance(instance); | ||
instance.component('v-map', VMap); | ||
installed = true; | ||
} | ||
}; | ||
|
||
export default install; | ||
|
||
export { VMap }; | ||
export { default as VMap } from './components/VMap.vue'; | ||
export { default } from './install'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { App as Application, Plugin } from 'vue'; | ||
import VMap from './components/VMap.vue'; | ||
import { setVueInstance } from './utils/config/index'; | ||
|
||
let installed: boolean = false; | ||
|
||
const install: Exclude<Plugin['install'], undefined> = ( | ||
instance: Application, | ||
) => { | ||
if (!installed) { | ||
setVueInstance(instance); | ||
instance.component('VMap', VMap); | ||
installed = true; | ||
} | ||
}; | ||
|
||
export default install; |