Explorar o código

🎨 chore(confirm-button/directive): 优化二次确认弹窗

晓晓晓晓丶vv %!s(int64=4) %!d(string=hai) anos
pai
achega
0a1cde872b
Modificáronse 2 ficheiros con 2 adicións e 0 borrados
  1. 1 0
      src/components/confirm-button/index.vue
  2. 1 0
      src/plugins/vue-confirm.ts

+ 1 - 0
src/components/confirm-button/index.vue

@@ -40,6 +40,7 @@ const ConfirmButton = defineComponent({
         icon: createVNode(ExclamationCircleOutlined),
         title: props.confirmTitle,
         content: props.confirmContent,
+        okType: "danger",
         onOk: () => {
           emit("click");
         },

+ 1 - 0
src/plugins/vue-confirm.ts

@@ -9,6 +9,7 @@ const confirmEvent = (binding: DirectiveBinding) => {
     title: "请确认您的操作",
     content: "确定删除该内容吗?",
     icon: createVNode(ExclamationCircleOutlined),
+    okType: "danger",
     onOk: () => binding.value.call(),
   });
 };