mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 21:17:30 +00:00
2 lines
2.1 KiB
JavaScript
2 lines
2.1 KiB
JavaScript
import{_ as s}from"./index-p8cKYBY8.js";import{I as d,y as i,x as g,L as m,z as t,C as o,P as r,a5 as c}from"./vue-vendor-DV7DYXbz.js";const f={key:0,class:"modal fixed inset-0 z-50 flex items-center justify-center p-4"},y={class:"modal-content mx-auto w-full max-w-md rounded-2xl bg-white p-6 shadow-xl dark:bg-gray-800"},x={class:"mb-6 flex items-start gap-4"},u={class:"flex-1"},h={class:"mb-2 text-lg font-bold text-gray-900 dark:text-white"},b={class:"whitespace-pre-line text-sm leading-relaxed text-gray-700 dark:text-gray-300"},p={class:"flex gap-3"},w={__name:"ConfirmModal",props:{show:{type:Boolean,required:!0},title:{type:String,default:""},message:{type:String,default:""},confirmText:{type:String,default:"继续"},cancelText:{type:String,default:"取消"},type:{type:String,default:"primary",validator:e=>["primary","warning","danger"].includes(e)}},emits:["confirm","cancel"],setup(e){return(n,a)=>(i(),d(c,{to:"body"},[e.show?(i(),g("div",f,[t("div",y,[t("div",x,[t("div",{class:o(["flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full",e.type==="danger"?"bg-gradient-to-br from-red-400 to-red-500":e.type==="warning"?"bg-gradient-to-br from-yellow-400 to-yellow-500":"bg-primary"])},[t("i",{class:o(["text-xl text-white",e.type==="danger"?"fas fa-trash-alt":e.type==="warning"?"fas fa-exclamation":"fas fa-question"])},null,2)],2),t("div",u,[t("h3",h,r(e.title),1),t("p",b,r(e.message),1)])]),t("div",p,[t("button",{class:"flex-1 rounded-xl bg-gray-100 px-4 py-2.5 font-medium text-gray-700 transition-colors hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-200 dark:hover:bg-gray-600",onClick:a[0]||(a[0]=l=>n.$emit("cancel"))},r(e.cancelText),1),t("button",{class:o(["flex-1 rounded-xl px-4 py-2.5 font-medium text-white shadow-sm transition-all",e.type==="danger"?"bg-gradient-to-r from-red-500 to-red-600 hover:from-red-600 hover:to-red-700":e.type==="warning"?"bg-gradient-to-r from-yellow-500 to-orange-500 hover:from-yellow-600 hover:to-orange-600":"bg-primary hover:opacity-90"]),onClick:a[1]||(a[1]=l=>n.$emit("confirm"))},r(e.confirmText),3)])])])):m("",!0)]))}},C=s(w,[["__scopeId","data-v-9b6104f1"]]);export{C};
|