Allow me to present my scenario:
I am currently in the process of creating a modal using the following code snippet:
<Modal id="modal">
<my-component></my-component>
</Modal>
My goal is to make the content inside the modal dynamic, allowing for elements like <input>
or <table>
. I have experimented with slots, which do work, but they lack true dynamism. I'm curious if there might be something I overlooked that would provide more versatility to the slot.
This is how my modal is structured:
<div
:id="id"
class="main"
ref="main"
@click="close_modal"
>
<div ref="content" class="content" :style="{minHeight: height, minWidth: width}">
<div ref="title" class="title" v-if="title">
{{ title }}
<hr/>
</div>
<div ref="body" class="body">
<slot></slot>
</div>
</div>
</div>