mirror of
https://github.com/KevinMidboe/vue-js-modal.git
synced 2025-10-29 18:00:20 +00:00
29 lines
564 B
Vue
29 lines
564 B
Vue
<template>
|
|
<modal name="conditional-modal"
|
|
:adaptive="true"
|
|
:max-width="1000"
|
|
:max-height="400"
|
|
width="80%"
|
|
height="50%"
|
|
@before-open="beforeOpen">
|
|
<div style="padding:30px; text-align: center">
|
|
Hello!
|
|
</div>
|
|
</modal>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
name: 'ConditionalModal',
|
|
methods: {
|
|
beforeOpen(event) {
|
|
console.log('Event:', event)
|
|
console.log('Params:', event.params)
|
|
|
|
if (event.params.show === false) {
|
|
event.stop()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|