← Back
Editing: index381.js
import{c as e,s as a,k as t,r as l,p as s,q as o,v as c,e as r,A as m,x as i,B as n,S as d,a9 as u,a7 as p}from"./base-lib.js?v=VERSION_NUMBER";import{b as f,k as y}from"./utils-lib.js?v=VERSION_NUMBER";import{D as b}from"./ssl.js?v=VERSION_NUMBER";import{u as h}from"./useStore11.js?v=VERSION_NUMBER";import"./__commonjsHelpers__.js?v=VERSION_NUMBER";const v={class:"p-2rem"},_=e({__name:"index",props:{compData:{default:()=>{}}},emits:["close"],setup(e,{expose:_,emit:D}){const g=e,x=D,{activeTabs:j,sslIsRefresh:V,testIsRefresh:w,encryptIsRefresh:I,otherIsRefresh:N}=a(h()),R=t({title:"",cycle:30}),q=l({cycle:[{required:!0,message:"请输入剩余天数",trigger:"blur"},{validator:(e,a,t)=>{/^[1-9]\d*$/.test(a)?t():t(new Error("请输入大于0的正整数"))},trigger:["blur","change"]}]});return s((()=>{(()=>{var e;if((null==(e=g.compData)?void 0:e.domainName)&&g.compData.domainName.length>0){const e=g.compData.domainName.slice(0,2).join("|"),a=g.compData.domainName.length>2?"|...":"";R.title="".concat(g.compData.title," (").concat(e).concat(a,")")}else R.title=g.compData.title})()})),_({onConfirm:async()=>{var e;let a;try{a=f().load("正在配置证书自动续期,请稍候...");const t=await b({index:g.compData.index,cycle:R.cycle,name:R.title});if(f().request(t),t.status){const a={ssl:()=>V.value=!0,test:()=>w.value=!0,encrypt:()=>I.value=!0,other:()=>N.value=!0};null==(e=a[j.value])||e.call(a),x("close")}}catch(t){}finally{a&&a.close()}}}),(e,a)=>{const t=d,l=u,s=y,f=p;return o(),c("div",v,[r(f,{rules:i(q),model:i(R),"label-width":"100px"},{default:m((()=>[r(l,{label:"证书"},{default:m((()=>[r(t,{class:"!w-[28rem]",modelValue:i(R).title,"onUpdate:modelValue":a[0]||(a[0]=e=>i(R).title=e),disabled:""},null,8,["modelValue"])])),_:1}),r(l,{label:"剩余天数",prop:"cycle"},{default:m((()=>[r(s,{modelValue:i(R).cycle,"onUpdate:modelValue":a[1]||(a[1]=e=>i(R).cycle=e),width:"14rem",textType:"天",min:"1",type:"number"},{append:m((()=>a[2]||(a[2]=[n(" 天 ")]))),_:1},8,["modelValue"])])),_:1})])),_:1},8,["rules","model"])])}}});export{_ as default};
Save File
Cancel