<template>
<el-row class="mb-4">
<el-button @click="open" type="primary" show-confirm-button="false">Click</el-button>
</el-row>
</template>
<script setup>
import { ElMessageBox } from 'element-plus'
const open = () => {
ElMessageBox.confirm('提示内容', '提示', {
type: 'warning',
showCancelButton: false,
showConfirmButton: false,
showClose: false,
})
setTimeout(() => {
ElMessageBox.close(false)
}, 1500);
}
</script>
标签:MessageBox,ElementPlus,false,提示,关闭,ElMessageBox
From: https://www.cnblogs.com/Lueng/p/16785907.html