mirror of
https://github.com/KevinMidboe/vue-js-modal.git
synced 2025-10-29 18:00:20 +00:00
Update ModalsContainer.vue
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
v-for="modal in modals"
|
v-for="modal in modals"
|
||||||
:key="modal.id"
|
:key="modal.id"
|
||||||
v-bind="modal.config"
|
v-bind="modal.config"
|
||||||
|
v-on="modal.events"
|
||||||
@closed="remove(modal.id)"
|
@closed="remove(modal.id)"
|
||||||
>
|
>
|
||||||
<component
|
<component
|
||||||
@@ -26,7 +27,7 @@ export default {
|
|||||||
this.$modal._setDynamicContainer(this)
|
this.$modal._setDynamicContainer(this)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
add (modal, params, config) {
|
add (modal, params, config, events) {
|
||||||
let id = this.uid++
|
let id = this.uid++
|
||||||
config = config ? Object.assign({}, config) : {};
|
config = config ? Object.assign({}, config) : {};
|
||||||
if (!config.name) {
|
if (!config.name) {
|
||||||
@@ -36,7 +37,8 @@ export default {
|
|||||||
id: id,
|
id: id,
|
||||||
component: modal,
|
component: modal,
|
||||||
params: params || {},
|
params: params || {},
|
||||||
config: config
|
config: config,
|
||||||
|
events: events
|
||||||
})
|
})
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$modal.show(config.name)
|
this.$modal.show(config.name)
|
||||||
|
|||||||
Reference in New Issue
Block a user