trigger-event.vue 544 B

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