errorDialog.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <!--
  2. * @Date: 2022-08-25 14:05:59
  3. * @LastEditors: StavinLi 495727881@qq.com
  4. * @LastEditTime: 2022-09-21 14:36:40
  5. * @FilePath: /Workflow-Vue3/src/components/dialog/errorDialog.vue
  6. -->
  7. <template>
  8. <el-dialog title="提示" v-model="visibleDialog">
  9. <div class="ant-confirm-body">
  10. <i class="anticon anticon-close-circle" style="color: #f00"></i>
  11. <span class="ant-confirm-title">当前无法发布</span>
  12. <div class="ant-confirm-content">
  13. <div>
  14. <p class="error-modal-desc">以下内容不完善,需进行修改</p>
  15. <div class="error-modal-list">
  16. <div class="error-modal-item" v-for="item in props.list">
  17. <div class="error-modal-item-label">流程设计</div>
  18. <div class="error-modal-item-content">{{ item.name }} 未选择{{ item.type }}</div>
  19. </div>
  20. </div>
  21. </div>
  22. </div>
  23. </div>
  24. <template #footer>
  25. <el-button @click="visibleDialog = false">我知道了</el-button>
  26. <el-button type="primary" @click="visibleDialog = false">前往修改</el-button>
  27. </template>
  28. </el-dialog>
  29. </template>
  30. <script setup lang="ts">
  31. import type { PropType } from 'vue'
  32. export type Ilist = {
  33. name: string
  34. type: string
  35. }
  36. const props = defineProps({
  37. list: {
  38. type: Array as unknown as PropType<[Ilist]>,
  39. default: () => []
  40. },
  41. visible: {
  42. type: Boolean,
  43. default: false
  44. }
  45. })
  46. const emits = defineEmits(['update:visible'])
  47. const visibleDialog = computed({
  48. get() {
  49. return props.visible
  50. },
  51. set(val) {
  52. emits('update:visible', val)
  53. }
  54. })
  55. </script>
  56. <style scoped>
  57. .ant-confirm-body .ant-confirm-title {
  58. color: rgba(0, 0, 0, 0.85);
  59. font-weight: 500;
  60. font-size: 16px;
  61. line-height: 1.4;
  62. display: block;
  63. overflow: hidden;
  64. }
  65. .ant-confirm-body .ant-confirm-content {
  66. margin-left: 38px;
  67. font-size: 14px;
  68. color: rgba(0, 0, 0, 0.65);
  69. margin-top: 8px;
  70. }
  71. .ant-confirm-body > .anticon {
  72. font-size: 22px;
  73. margin-right: 16px;
  74. float: left;
  75. }
  76. </style>