mirror of
https://github.com/KevinMidboe/vue-js-modal.git
synced 2025-10-29 18:00:20 +00:00
Added "componentName" param for optional component name (#53)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import Modal from './Modal.vue'
|
||||
|
||||
const defaultComponentName = 'modal'
|
||||
|
||||
const Plugin = {
|
||||
install (Vue, options = {}) {
|
||||
if (this.installed) {
|
||||
@@ -23,7 +25,8 @@ const Plugin = {
|
||||
}
|
||||
}
|
||||
|
||||
Vue.component('modal', Modal)
|
||||
const componentName = options.componentName || defaultComponentName
|
||||
Vue.component(componentName, Modal)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user