customized-icon.vue 437 B

1234567891011121314151617181920
  1. <template>
  2. <el-button text @click="open">Click to open Message Box</el-button>
  3. </template>
  4. <script lang="ts" setup>
  5. import { markRaw } from 'vue'
  6. import { ElMessageBox } from 'element-plus'
  7. import { Delete } from '@element-plus/icons-vue'
  8. const open = () => {
  9. ElMessageBox.confirm(
  10. 'It will permanently delete the file. Continue?',
  11. 'Warning',
  12. {
  13. type: 'warning',
  14. icon: markRaw(Delete),
  15. }
  16. )
  17. }
  18. </script>