File: /www/server/panel/BTPanel/static/js/add-url-proxy.js
import{cO as v,W as y,b as V,a as x,cP as k}from"./utils-lib.js?v=1777008528";import{c as w,I as C,j as d,k as F,J as T,p as e,C as U,v as a,e as t,q as B,a1 as E,Q as I,ad as R,aB as D,ab as L}from"./base-lib.js?v=1777008528";import{o as P,f as $,u as l,t as N,s as O,a as i,h as j,p as r,b as q,c as A,d as H,e as J}from"./useController11.js?v=1777008528";import"./__commonjsHelpers__.js?v=1777008528";import"./site.js?v=1777008528";import"./index3.js?v=1777008528";import"./index119.js?v=1777008528";import"./index116.js?v=1777008528";import"./useStore2.js?v=1777008528";const Q={class:"p-[20px]"},S={class:"flex items-center"},le=w({__name:"add-url-proxy",setup(W,{expose:m}){return m({onConfirm:P}),(z,o)=>{const p=v,s=R,u=y,_=V,c=x,f=D,b=L,g=k,h=C("bt-loading");return d(),F("div",Q,[T((d(),U(b,{ref_key:"proxyFormRef",ref:q,model:e(l),rules:e(A),"label-width":"100px",disabled:e(H)},{default:a(()=>[t(s,{label:"代理目录",prop:"path"},{default:a(()=>[t(p,{modelValue:e(l).path,"onUpdate:modelValue":o[0]||(o[0]=n=>e(l).path=n),placeholder:"请输入代理目录,例如:/web",width:"42rem"},null,8,["modelValue"])]),_:1}),t(s,{label:"目标",prop:"proxysite"},{default:a(()=>[B("div",S,[t(s,null,{default:a(()=>[t(u,{class:"!w-[16rem]",modelValue:e(l).targetType,"onUpdate:modelValue":o[1]||(o[1]=n=>e(l).targetType=n),placeholder:"请选择",options:e(N),onChange:e(O)},null,8,["modelValue","options","onChange"])]),_:1}),t(p,{modelValue:e(l).proxysite,"onUpdate:modelValue":o[2]||(o[2]=n=>e(l).proxysite=n),placeholder:e(l).targetType==="http"?"请输入目标地址":"请选择sock文件",class:"!ml-[1rem]",width:"24rem",iconType:e(l).targetType==="http"?!1:"folder",onFolder:e(i),onInput:e(j)},E({_:2},[e(l).targetType!=="http"?{name:"append",fn:a(()=>[t(c,{onClick:e(i)},{default:a(()=>[t(_,{icon:"el-folder-opened",class:"cursor-pointer"})]),_:1},8,["onClick"])]),key:"0"}:void 0]),1032,["modelValue","placeholder","iconType","onFolder","onInput"])])]),_:1}),t(s,{label:"发送域名(host)",prop:"todomain","label-width":"100px"},{default:a(()=>[t(f,{placement:"top-start",effect:"dark",title:"",content:"请求转发到后端服务器时的主机名,一般为$http_host,如果目标URL是域名,则需要改为域名",width:"400",visible:e(r),"onUpdate:visible":o[5]||(o[5]=n=>I(r)?r.value=n:null),"trigger-keys":[],trigger:"focus"},{reference:a(()=>[t(p,{modelValue:e(l).todomain,"onUpdate:modelValue":o[3]||(o[3]=n=>e(l).todomain=n),onFocus:o[4]||(o[4]=n=>r.value=!0),placeholder:"请输入发送域名",width:"42rem"},null,8,["modelValue"])]),_:1},8,["visible"])]),_:1}),t(s,{label:"备注"},{default:a(()=>[t(p,{modelValue:e(l).ps,"onUpdate:modelValue":o[6]||(o[6]=n=>e(l).ps=n),placeholder:"请输入备注,可为空",width:"42rem"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules","disabled"])),[[h,e($)]]),t(g,{options:e(J),class:"mt-2rem ml-[20px]"},null,8,["options"])])}}});export{le as default};