customized-icon.vue 429 B

12345678910111213141516
  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('It will permanently delete the file. Continue?', 'Warning', {
  10. type: 'warning',
  11. icon: markRaw(Delete),
  12. })
  13. }
  14. </script>