import{l as e,k as l,j as a}from"./utils-lib.js?v=1761009159";import{c as o,s as t,q as s,v as m,x as r,e as d,B as u,y as n,C as i,z as c,Q as p,G as f,ab as _,a9 as h}from"./base-lib.js?v=1761009159";import{B as V}from"./index115.js?v=1761009159";import{_ as b}from"./index105.js?v=1761009159";import{I as j}from"./validator.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./ace.js?v=1761009159";import"./index106.js?v=1761009159";import"./column.js?v=1761009159";const C={class:"p-[20px]"},g={class:"p-[20px]"},x=o({__name:"compile-install",setup(o){const{config:x,getCustomModuleData:w,setCustomModuleData:v,handleAddCustomModule:y,clearAddForm:A,submitCustomModule:U}=j(),{rules:k,tableColumn:F,customData:M,customForm:S,customVisible:D,customFormRef:R}=t(j());return s(w),(o,t)=>{const s=f,j=e,w=b,B=l,q=_,z=V,E=h,G=a;return m(),r("div",C,[d(w,null,{"header-left":u(()=>[d(s,{type:"primary",onClick:n(y)},{default:u(()=>t[5]||(t[5]=[i("添加自定义模块",-1)])),_:1,__:[5]},8,["onClick"])]),content:u(()=>[d(j,{ref:"customTableRef",column:n(F),"max-height":"30rem",data:n(M),onSelectAll:n(v),onSelect:n(v)},{empty:u(()=>t[6]||(t[6]=[c("div",{class:"flex items-center justify-center"},"列表为空",-1)])),_:1},8,["column","data","onSelectAll","onSelect"])]),_:1}),d(G,{modelValue:n(D),"onUpdate:modelValue":t[4]||(t[4]=e=>p(D)?D.value=e:null),title:"添加自定义选装模块",area:"56","show-footer":"",onConfirm:n(U),onCancel:n(A)},{default:u(()=>[c("div",g,[d(E,{ref_key:"customFormRef",ref:R,model:n(S),rules:n(k)},{default:u(()=>[d(q,{prop:"args_name",label:"模块名称"},{default:u(()=>[d(B,{modelValue:n(S).args_name,"onUpdate:modelValue":t[0]||(t[0]=e=>n(S).args_name=e),placeholder:"请输入模块名称，只能输入字母、数字、下划线",width:"30rem",clearable:""},null,8,["modelValue"])]),_:1}),d(q,{prop:"ps",label:"模块描述"},{default:u(()=>[d(B,{modelValue:n(S).ps,"onUpdate:modelValue":t[1]||(t[1]=e=>n(S).ps=e),maxlength:"30",placeholder:"请输入模块描述，30字以内",width:"30rem","show-word-limit":"",clearable:""},null,8,["modelValue"])]),_:1}),d(q,{prop:"args",label:"模块参数"},{default:u(()=>[d(B,{modelValue:n(S).args,"onUpdate:modelValue":t[2]||(t[2]=e=>n(S).args=e),placeholder:"如：--add-module=/tmp/echo/echo-nginx-module-master",width:"30rem",clearable:""},null,8,["modelValue"])]),_:1}),d(q,{prop:"init",label:"前置脚本"},{default:u(()=>[d(z,{ref:"AceEditor",modelValue:n(S).init,"onUpdate:modelValue":t[3]||(t[3]=e=>n(S).init=e),class:"!h-[32rem] !w-[36rem]","editor-option":n(x)},null,8,["modelValue","editor-option"])]),_:1})]),_:1},8,["model","rules"])])]),_:1},8,["modelValue","onConfirm","onCancel"])])}}});export{x as default};
