mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 18:01:24 +08:00
21 lines
437 B
Vue
21 lines
437 B
Vue
|
<template>
|
||
|
<el-button text @click="open">Click to open Message Box</el-button>
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts" setup>
|
||
|
import { markRaw } from 'vue'
|
||
|
import { ElMessageBox } from 'element-plus'
|
||
|
import { Delete } from '@element-plus/icons-vue'
|
||
|
|
||
|
const open = () => {
|
||
|
ElMessageBox.confirm(
|
||
|
'It will permanently delete the file. Continue?',
|
||
|
'Warning',
|
||
|
{
|
||
|
type: 'warning',
|
||
|
icon: markRaw(Delete),
|
||
|
}
|
||
|
)
|
||
|
}
|
||
|
</script>
|