← Back
Editing: index460.js
import{n as e,L as s,K as a,k as r}from"./utils-lib.js?v=VERSION_NUMBER";import{c as o,ay as t,k as i,r as l,p as d,q as n,v as m,e as p,A as u,x as c,y as f,a9 as w,a7 as _}from"./base-lib.js?v=VERSION_NUMBER";import{_ as b}from"./index145.js?v=VERSION_NUMBER";import{bb as j}from"./firewall.js?v=VERSION_NUMBER";import{f as v}from"./validator.js?v=VERSION_NUMBER";import{g as h}from"./useStore5.js?v=VERSION_NUMBER";import"./__commonjsHelpers__.js?v=VERSION_NUMBER";import"./index104.js?v=VERSION_NUMBER";import"./column.js?v=VERSION_NUMBER";const x={class:"ml-[10rem]"},g=o({__name:"index",setup(o,{expose:g}){const{refs:{isRefreshSpywares:y}}=h(),D=t("popupClose"),R=i({dirs:""}),V=l(),k=l(!1),E={dirs:[{validator:(e,s,a)=>{if(!(s.length>0))return a(new Error("请输入目录"));a()},trigger:["blur","change"]}]},S=[{content:"添加指定目录",event:()=>{v({type:"dir",change(e){""!=R.dirs?R.dirs=R.dirs+"\n"+e:R.dirs=e}})}},{content:"添加网站目录",event:()=>e({title:"添加网站目录",area:50,component:()=>s((()=>import("./add-website-dir.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url),compData:R,showFooter:!0})}];return d((()=>{})),g({onConfirm:async e=>{await V.value.validate(),a({request:j({data:JSON.stringify({dirs:R.dirs.split("\n")})}),loading:k,success:()=>{D(),y.value=!0}})}}),(e,s)=>{const a=r,o=w,t=b,i=_;return n(),m("div",null,[p(i,{disabled:c(k),ref_key:"addDir",ref:V,rules:E,model:c(R),class:"p-[2rem] addDirFrom overflow-auto max-h-[60rem]","label-width":"5rem"},{default:u((()=>[p(o,{label:"目录",prop:"dirs"},{default:u((()=>[p(a,{type:"textarea",modelValue:c(R).dirs,"onUpdate:modelValue":s[0]||(s[0]=e=>c(R).dirs=e),width:"30rem",class:"resize-none",autosize:{minRows:5,maxRows:5},placeholder:"如需填写多个目录请换行填写\n例:/www/aaa /www/bbb",clearable:""},null,8,["modelValue"])])),_:1}),p(o,null,{default:u((()=>[f("div",x,[p(t,{options:S})])])),_:1})])),_:1},8,["disabled","model"])])}}});export{g as default}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { __vite__mapDeps.viteFileDeps = [] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) }
Save File
Cancel