mirror of
https://github.com/KevinMidboe/vue-js-modal.git
synced 2025-10-29 18:00:20 +00:00
Update index.js
This commit is contained in:
@@ -24,14 +24,14 @@ const Plugin = {
|
|||||||
_setDynamicContainer (dynamicContainer) {
|
_setDynamicContainer (dynamicContainer) {
|
||||||
Plugin.dynamicContainer = dynamicContainer
|
Plugin.dynamicContainer = dynamicContainer
|
||||||
},
|
},
|
||||||
show (modal, paramsOrProps, params) {
|
show (modal, paramsOrProps, params, events = null) {
|
||||||
if (typeof modal === 'string') {
|
if (typeof modal === 'string') {
|
||||||
Plugin.event.$emit('toggle', modal, true, paramsOrProps)
|
Plugin.event.$emit('toggle', modal, true, paramsOrProps)
|
||||||
} else {
|
} else {
|
||||||
if (Plugin.dynamicContainer === null) {
|
if (Plugin.dynamicContainer === null) {
|
||||||
console.warn('[vue-js-modal] In order to render dynamic modals, a <modals-container> component must be present on the page')
|
console.warn('[vue-js-modal] In order to render dynamic modals, a <modals-container> component must be present on the page')
|
||||||
} else {
|
} else {
|
||||||
Plugin.dynamicContainer.add(modal, paramsOrProps, params)
|
Plugin.dynamicContainer.add(modal, paramsOrProps, params, events)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user