-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update source to be a installable component
- Loading branch information
1 parent
03ca6ad
commit 0633501
Showing
6 changed files
with
33 additions
and
5 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
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 @@ | ||
export { default as VSvg } from './VSvg.vue'; |
This file was deleted.
Oops, something went wrong.
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,2 @@ | ||
export { VSvg } from './components'; | ||
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 { VSvg } from './components'; | ||
import { setVueInstance } from './utils/config/index'; | ||
|
||
let installed: boolean = false; | ||
|
||
const install: Exclude<Plugin['install'], undefined> = ( | ||
instance: Application, | ||
) => { | ||
if (!installed) { | ||
setVueInstance(instance); | ||
instance.component('VSvg', VSvg); | ||
installed = true; | ||
} | ||
}; | ||
|
||
export default 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,11 @@ | ||
import { App as Application } from 'vue'; | ||
|
||
const config = {}; | ||
|
||
export let VueInstance: Application; | ||
|
||
export { config as default }; | ||
|
||
export const setVueInstance = (instance: Application) => { | ||
VueInstance = instance; | ||
}; |