src/components/Dialog/FormDialog.vue
@@ -8,7 +8,13 @@
    <slot></slot>
    <template #footer>
      <div class="dialog-footer">
        <el-button type="primary" @click="handleConfirm">确认</el-button>
        <el-button
          v-if="showConfirm"
          type="primary"
          @click="handleConfirm"
        >
          确认
        </el-button>
        <el-button @click="handleCancel">取消</el-button>
      </div>
    </template>
@@ -44,6 +50,9 @@
  set: (val) => emit('update:modelValue', val)
})
// 详情模式不展示“确认”按钮,其它类型正常显示
const showConfirm = computed(() => props.operationType !== 'detail')
const computedTitle = computed(() => {
  if (typeof props.title === 'function') {
    return props.title(props.operationType)