Vue renderless component to enqueue components rendering.
https://vue-enqueue.netlify.app/
In the example below (using ElementUI), dialogs will be shown one after the other:
<template>
<div>
<el-button type="primary" @click="isDialog1Visible = isDialog2Visible = true">
Open both dialogs
</el-button>
<Enqueue>
<el-dialog v-if="isDialog1Visible" visible title="Dialog 1" @close="isDialog1Visible = false">...</el-dialog>
</Enqueue>
<Enqueue>
<el-dialog v-if="isDialog2Visible" visible title="Dialog 2" @close="isDialog2Visible = false">...</el-dialog>
</Enqueue>
</div>
</template>
<script>
import { Enqueue } from 'vue-enqueue'
export default {
components: {
Enqueue,
},
data: () => ({
isDialog1Visible: false,
isDialog2Visible: false,
}),
}
</script>
Install the vue-enqueue
package:
npm i vue-enqueue
Or
yarn add vue-enqueue
Import the Enqueue
component from vue-enqueue
:
<script>
import { Enqueue } from 'vue-enqueue'
export default {
components: {
Enqueue,
},
}
</script>
This repo is based on @Akryum https://github.com/Akryum/vue-mention.