Переглянути джерело

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

晓晓晓晓丶vv 4 роки тому
батько
коміт
0a1cde872b

+ 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(),
   });
 };