首页 > 其他分享 >ElementPlus的MessageBox自动关闭

ElementPlus的MessageBox自动关闭

时间:2022-10-12 20:56:35浏览次数:56  
标签:MessageBox ElementPlus false 提示 关闭 ElMessageBox

<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

相关文章