import{_ as e}from"./index105.js?v=1761009159";import{c as a,s,r as t,e as o,C as r,aD as l,v as n,x as i,z as m,B as p,y as c,Q as d,az as u,G as f}from"./base-lib.js?v=1761009159";import{fO as b,e as v,p as g,ao as h,ap as j,k as w}from"./utils-lib.js?v=1761009159";import{u as _}from"./useStore13.js?v=1761009159";import{g as x,d as y,o as C,a as k}from"./useController20.js?v=1761009159";import{a as B}from"./column.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./useController5.js?v=1761009159";import"./site.js?v=1761009159";import"./useStore4.js?v=1761009159";import"./useController6.js?v=1761009159";import"./index106.js?v=1761009159";import"./validator.js?v=1761009159";import"./useMethod5.js?v=1761009159";const z={class:""},V={class:"flex items-end"},D=a({__name:"index",setup(a){const{isRefreshDomain:D,domain:I}=s(_()),P=t(!1),S=j([{label:"删除",value:"delete",event:async(e,a,s,t)=>{k(s.value)}}]),{BtTable:U,BtBatch:q,config:F}=b({request:x,columns:[B(),{label:"域名",prop:"name",width:400,render:e=>o("div",{class:"truncate"},[o(v,{href:"http://".concat(e.name,":").concat(e.port),target:"_blank"},{default:()=>[e.name]})])},{label:"端口",prop:"port"},{label:"操作",align:"right",render:e=>1===F.data.length?o("span",null,[r("不可操作")]):l("span",{class:"cursor-pointer bt-link",onClick:async()=>{await g({title:"删除域名【".concat(e.name,"】"),content:"您确定要删除此域名吗？",onConfirm:async()=>{await y(e)}})}},"删除")}],extension:[S,h(D)]});return(a,s)=>{const t=w,l=u,b=f,v=e;return n(),i("div",z,[m("div",V,[o(l,{ref:"popover",placement:"top-start",width:"36rem","popper-class":"green-tips-popover !p-0 !border-none",visible:c(P),"onUpdate:visible":s[2]||(s[2]=e=>d(P)?P.value=e:null),"trigger-keys":[],trigger:"focus"},{default:p(()=>s[3]||(s[3]=[m("div",{class:"!p-[12px] bg-primary text-white leading-[2.4rem]"},[r(" 如需绑定外网，请换行填写，每行一个域名，默认为80端口 "),m("br"),r(" IP地址格式：192.168.1.199 "),m("br"),r(" 泛解析添加方法 *.domain.com "),m("br"),r(" 如另加端口格式为 www.domain.com:88 ")],-1)])),reference:p(()=>[o(t,{modelValue:c(I),"onUpdate:modelValue":s[0]||(s[0]=e=>d(I)?I.value=e:null),type:"textarea",resize:"none",rows:4,width:"42rem",onFocus:s[1]||(s[1]=e=>P.value=!0),placeholder:"如需绑定外网，请换行填写，每行一个域名，默认为80端口\nIP地址格式：192.168.1.199\n泛解析添加方法 *.domain.com\n如另加端口格式为 www.domain.com:88",class:"domain-textarea"},null,8,["modelValue"])]),_:1},8,["visible"]),o(b,{type:"primary",class:"absolute",style:{right:"4rem",top:"5.5rem"},onClick:c(C)},{default:p(()=>s[4]||(s[4]=[r(" 添加 ",-1)])),_:1,__:[4]},8,["onClick"])]),o(v,null,{content:p(()=>[o(c(U),{"max-height":440})]),"footer-left":p(()=>[o(c(q))]),_:1})])}}});export{D as default};
