mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
e97fe719c4
- Update button's type in examples per changes for button
33 lines
656 B
Vue
33 lines
656 B
Vue
<template>
|
|
<el-button text @click="open">Click to open 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',
|
|
draggable: true,
|
|
}
|
|
)
|
|
.then(() => {
|
|
ElMessage({
|
|
type: 'success',
|
|
message: 'Delete completed',
|
|
})
|
|
})
|
|
.catch(() => {
|
|
ElMessage({
|
|
type: 'info',
|
|
message: 'Delete canceled',
|
|
})
|
|
})
|
|
}
|
|
</script>
|