byjove/src/components/model-crud/index.js

29 lines
726 B
JavaScript
Raw Normal View History

2019-11-06 20:18:07 -06:00
// Import vue component
import ByjoveModelCrud from './ByjoveModelCrud.vue'
// Declare install function executed by Vue.use()
export function install(Vue) {
if (install.installed) return;
install.installed = true;
Vue.component('ByjoveModelCrud', ByjoveModelCrud);
}
// Create module definition for Vue.use()
const plugin = {
install,
};
// Auto-install when vue is found (eg. in browser via <script> tag)
let GlobalVue = null;
if (typeof window !== 'undefined') {
GlobalVue = window.Vue;
} else if (typeof global !== 'undefined') {
GlobalVue = global.Vue;
}
if (GlobalVue) {
GlobalVue.use(plugin);
}
// To allow use as module (npm/webpack/etc.) export component
export default ByjoveModelCrud