← Back
Editing: advanced2.js
import{ai as e,K as a,at as l,al as s,W as t,e as o}from"./utils-lib.js?v=1765440387";import{c as n,r as i,k as r,e as c,p as m,G as d,H as u,x as p,q as v,v as f,M as g,C as _,P as h,y,B as V,z as x,J as j,F as w,a$ as k,am as b,b0 as U}from"./base-lib.js?v=1765440387";import{g7 as C,gu as D,gd as R}from"./site.js?v=1765440387";import{u as L}from"./useStore3.js?v=1765440387";import{t as q}from"./useController6.js?v=1765440387";import{_ as z}from"./masker.vue_vue_type_script_setup_true_lang.js?v=1765440387";import"./__commonjsHelpers__.js?v=1765440387";import"./column.js?v=1765440387";import"./index94.js?v=1765440387";import"./validator.js?v=1765440387";import"./index120.js?v=1765440387";import"./index.vue_vue_type_style_index_0_scoped_b3c4124c_lang.js?v=1765440387";const H=""+new URL("../icons/icon-site-create.svg",import.meta.url).href,I=""+new URL("../icons/icon-site-edit.svg",import.meta.url).href,B=""+new URL("../icons/icon-site-delete.svg",import.meta.url).href,F={class:"overall-config overall-config-top"},G={class:"overall-config-item"},J={class:"overall-config-item"},K={class:"overall-config-item"},M={class:"mt-2rem"},O={class:"flex items-center"},P={class:"ml-[1rem] text-[#20a53a] mr-[.4rem] select-none"},S={key:0,class:"overall-config-content"},W={class:"overall-config-content-left"},$={class:"overall-config-content-right"},A={class:"mr-1rem"},E=o(n({__name:"advanced",props:{compData:{default:{}}},setup(o){const{siteInfo:n}=L(),E=i("forbid"),N=i(!1),Q=i(!1),T=r({create:["create","mkdir","link"],edit:["rename","chown","chmod","modify"],delete:["unlink","rmdir"]}),X=i({}),Y=i({create:!1,edit:!1,delete:!1}),Z=r({create:"创建",edit:"编辑",delete:"删除"}),ee=i([{label:"禁止功能",name:"forbid",lazy:!0,render:()=>c("span",null,null)}]),ae=async(l,s)=>{const t={value:l?1:0,path_id:X.value.pid,[e(s)?"key":"batch"]:s},o=e(s)?C:D;(await a({loading:"正在修改配置,请稍后...",request:o(t),message:!0})).status&&le()},le=async()=>{try{N.value=!0;const{data:e}=await R({path:n.value.path});let a=[];if(e){for(const l in e)-1!==l.indexOf("is_")?a[l]=!!e[l]:a[l]=e[l];X.value=a;for(const a in T)Y.value[a]=T[a].some(a=>e["is_".concat(a)])}}catch(e){l(e)}finally{N.value=!1}};return m(()=>{le()}),(e,a)=>{var l;const n=s,i=b,r=U,m=t,C=d("bt-loading");return u((v(),f("div",null,[(null==(l=p(X))?void 0:l.path)?_("",!0):(v(),g(z,{key:0,compData:{...o.compData,init:le}},null,8,["compData"])),c(n,{ref:"tamperRef",type:"",modelValue:p(E),"onUpdate:modelValue":a[0]||(a[0]=e=>h(E)?E.value=e:null),options:p(ee)},null,8,["modelValue","options"]),y("div",F,[y("div",G,[a[8]||(a[8]=y("img",{class:"mr-[.6rem]",width:"16",src:H,alt:""},null,-1)),a[9]||(a[9]=y("span",{class:"mr-1rem"},"拦截创建",-1)),c(i,{modelValue:p(Y).create,"onUpdate:modelValue":a[1]||(a[1]=e=>p(Y).create=e),onChange:a[2]||(a[2]=e=>ae(p(Y).create,1))},null,8,["modelValue"])]),c(r,{direction:"vertical",class:"!h-2rem !mx-1.6rem"}),y("div",J,[a[10]||(a[10]=y("img",{class:"mr-[.6rem]",width:"16",src:I,alt:""},null,-1)),a[11]||(a[11]=y("span",{class:"mr-1rem"},"拦截编辑",-1)),c(i,{modelValue:p(Y).edit,"onUpdate:modelValue":a[3]||(a[3]=e=>p(Y).edit=e),onChange:a[4]||(a[4]=e=>ae(p(Y).edit,2))},null,8,["modelValue"])]),c(r,{direction:"vertical",class:"!h-2rem !mx-1.6rem"}),y("div",K,[a[12]||(a[12]=y("img",{class:"mr-[.6rem]",width:"16",src:B,alt:""},null,-1)),a[13]||(a[13]=y("span",{class:"mr-1rem"},"拦截删除",-1)),c(i,{modelValue:p(Y).delete,"onUpdate:modelValue":a[5]||(a[5]=e=>p(Y).delete=e),onChange:a[6]||(a[6]=e=>ae(p(Y).delete,3))},null,8,["modelValue"])])]),y("div",M,[y("div",O,[a[14]||(a[14]=V(" 开启高级设置 ",-1)),y("div",{class:"more flex items-center cursor-pointer pl-[1rem]",onClick:a[7]||(a[7]=e=>Q.value=!p(Q))},[y("div",P,x("".concat(p(Q)?"折叠":"详情")),1),y("i",{class:j(["text-[16px]",p(Q)?"svgtofont-el-arrow-up":"svgtofont-el-arrow-down"])},null,2)])]),p(Q)?(v(),f("div",S,[(v(!0),f(w,null,k(p(T),(e,a)=>(v(),f("div",{class:"overall-config-content-item",key:a},[y("div",W,"拦截"+x(p(Z)[a]),1),y("div",$,[(v(!0),f(w,null,k(e,(e,a)=>(v(),f("div",{class:"overall-config-item",key:a},[y("span",A,"拦截"+x(p(q)[e]),1),c(i,{modelValue:p(X)["is_".concat(e)],"onUpdate:modelValue":a=>p(X)["is_".concat(e)]=a,onChange:a=>ae(p(X)["is_".concat(e)],"is_".concat(e))},null,8,["modelValue","onUpdate:modelValue","onChange"])]))),128))])]))),128))])):_("",!0)]),c(m,{class:"mt-2rem",options:[{content:"提示:当前配置默认拦截以上规则,请根据当前项目需求设置和配置规则"}]})])),[[C,p(N)],[C,"正在获取站点防篡改信息,请稍侯","title"]])}}}),[["__scopeId","data-v-f8e2d238"]]);export{E as default};
Save File
Cancel