Add "model crud" component
This commit is contained in:
parent
2c728216a1
commit
c87fd1ab35
3 changed files with 391 additions and 0 deletions
28
src/components/model-crud/index.js
Normal file
28
src/components/model-crud/index.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
// 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue