mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-05 04:37:47 +08:00
27 lines
540 B
Vue
27 lines
540 B
Vue
<template>
|
|
<el-popconfirm
|
|
confirm-button-text="Yes"
|
|
cancel-button-text="No"
|
|
:icon="InfoFilled"
|
|
icon-color="red"
|
|
title="Are you sure to delete this?"
|
|
@confirm="confirmEvent"
|
|
@cancel="cancelEvent"
|
|
>
|
|
<template #reference>
|
|
<el-button>Delete</el-button>
|
|
</template>
|
|
</el-popconfirm>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { InfoFilled } from '@element-plus/icons-vue'
|
|
|
|
const confirmEvent = () => {
|
|
console.log('confirm!')
|
|
}
|
|
const cancelEvent = () => {
|
|
console.log('cancel!')
|
|
}
|
|
</script>
|