trigger-event.vue 535 B

123456789101112131415161718
  1. <template>
  2. <el-popconfirm confirm-button-text="Yes" cancel-button-text="No" :icon="InfoFilled" icon-color="#626AEF" title="Are you sure to delete this?" @confirm="confirmEvent" @cancel="cancelEvent">
  3. <template #reference>
  4. <el-button>Delete</el-button>
  5. </template>
  6. </el-popconfirm>
  7. </template>
  8. <script setup lang="ts">
  9. import { InfoFilled } from '@element-plus/icons-vue'
  10. const confirmEvent = () => {
  11. console.log('confirm!')
  12. }
  13. const cancelEvent = () => {
  14. console.log('cancel!')
  15. }
  16. </script>