mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-14 01:11:25 +08:00
32 lines
644 B
Vue
32 lines
644 B
Vue
<template>
|
|
<el-button type="text" @click="open">Click to open the Message Box</el-button>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
|
const open = () => {
|
|
ElMessageBox.confirm(
|
|
'proxy will permanently delete the file. Continue?',
|
|
'Warning',
|
|
{
|
|
confirmButtonText: 'OK',
|
|
cancelButtonText: 'Cancel',
|
|
type: 'warning',
|
|
}
|
|
)
|
|
.then(() => {
|
|
ElMessage({
|
|
type: 'success',
|
|
message: 'Delete completed',
|
|
})
|
|
})
|
|
.catch(() => {
|
|
ElMessage({
|
|
type: 'info',
|
|
message: 'Delete canceled',
|
|
})
|
|
})
|
|
}
|
|
</script>
|