Answer the question
In order to leave comments, you need to log in
What is the best way to implement modal windows in VUE?
There is a large list of modal windows with different content (not template ones).
How best to implement their call.
<button @click="showModal('reg')"></button>
modal-item(target="reg")
modal-item(target="auth")
....
Answer the question
In order to leave comments, you need to log in
Make self-sufficient components that will open the necessary windows, containing the state of the window, like this:
<template>
<div>
<q-btn
v-bind="$attrs"
@click="show = true"
></q-btn>
<q-dialog v-model="show">
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Rerum repellendus sit voluptate voluptas eveniet porro. Rerum blanditiis perferendis totam, ea at omnis vel numquam exercitationem aut, natus minima, porro labore.
</p>
<q-btn
label="OK"
@click="show = false"
/>
</q-dialog>
</div>
</template>
<script>
export default {
inheritAttrs: false,
data () {
return {
show: false
}
}
}
</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question