Matthew Aaron Raymer
2 years ago
3 changed files with 20 additions and 1 deletions
@ -0,0 +1,18 @@ |
|||
import Vue from 'vue' |
|||
import { PluginObject } from 'vue' |
|||
|
|||
// define the plugin class
|
|||
class VueDexiePlugin implements PluginObject<{}> { |
|||
// the install method is called when the plugin is installed
|
|||
public static install(app: typeof Vue): void { |
|||
// define a custom property
|
|||
app.$myProperty = 'Hello, World!' |
|||
|
|||
// define a custom method
|
|||
app.prototype.$myMethod = (): string => { |
|||
return this.$myProperty |
|||
} |
|||
} |
|||
} |
|||
|
|||
export default new VueDexiePlugin() |
Loading…
Reference in new issue