可以使用 Element UI 的 Dialog 组件来实现点击按钮弹出对话框的效果。
首先,在你的 template 中添加一个 Dialog 组件,并为其指定一个唯一的 id:
<template>
<el-dialog :visible.sync="dialogVisible" title="提示" width="30%">
对话框内容
</el-dialog>
</template>
然后,在你的 script 中添加一个变量来控制 Dialog 的可见性:
<