mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-05 20:58:22 +08:00
29 lines
520 B
Vue
29 lines
520 B
Vue
|
<template>
|
||
|
<el-popconfirm
|
||
|
confirm-button-text="Yes"
|
||
|
cancel-button-text="No"
|
||
|
icon="el-icon-info"
|
||
|
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 lang="ts">
|
||
|
export default {
|
||
|
methods: {
|
||
|
confirmEvent() {
|
||
|
console.log('confirm!')
|
||
|
},
|
||
|
cancelEvent() {
|
||
|
console.log('cancel!')
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
</script>
|