← Back
Editing: compile-install.js
import{l as e,k as l,j as a}from"./utils-lib.js?v=VERSION_NUMBER";import{c as o,s as t,p as s,q as m,v as r,e as d,A as u,x as n,B as i,y as p,P as c,D as f,a9 as _,a7 as h}from"./base-lib.js?v=VERSION_NUMBER";import{B as V}from"./index140.js?v=VERSION_NUMBER";import{_ as b}from"./index103.js?v=VERSION_NUMBER";import{I as j}from"./validator.js?v=VERSION_NUMBER";import"./__commonjsHelpers__.js?v=VERSION_NUMBER";import"./ace.js?v=VERSION_NUMBER";import"./index104.js?v=VERSION_NUMBER";import"./column.js?v=VERSION_NUMBER";const g={class:"p-[20px]"},x={class:"p-[20px]"},C=o({__name:"compile-install",setup(o){const{config:C,getCustomModuleData:w,setCustomModuleData:v,handleAddCustomModule:y,clearAddForm:A,submitCustomModule:U}=j(),{rules:k,tableColumn:D,customData:F,customForm:M,customVisible:S,customFormRef:R}=t(j());return s(w),(o,t)=>{const s=f,j=e,w=b,B=l,q=_,E=V,H=h,I=a;return m(),r("div",g,[d(w,null,{"header-left":u((()=>[d(s,{type:"primary",onClick:n(y)},{default:u((()=>t[5]||(t[5]=[i("添加自定义模块")]))),_:1},8,["onClick"])])),content:u((()=>[d(j,{ref:"customTableRef",column:n(D),"max-height":"30rem",data:n(F),onSelectAll:n(v),onSelect:n(v)},{empty:u((()=>t[6]||(t[6]=[p("div",{class:"flex items-center justify-center"},"列表为空",-1)]))),_:1},8,["column","data","onSelectAll","onSelect"])])),_:1}),d(I,{modelValue:n(S),"onUpdate:modelValue":t[4]||(t[4]=e=>c(S)?S.value=e:null),title:"添加自定义选装模块",area:"56","show-footer":"",onConfirm:n(U),onCancel:n(A)},{default:u((()=>[p("div",x,[d(H,{ref_key:"customFormRef",ref:R,model:n(M),rules:n(k)},{default:u((()=>[d(q,{prop:"args_name",label:"模块名称"},{default:u((()=>[d(B,{modelValue:n(M).args_name,"onUpdate:modelValue":t[0]||(t[0]=e=>n(M).args_name=e),placeholder:"请输入模块名称,只能输入字母、数字、下划线",width:"30rem",clearable:""},null,8,["modelValue"])])),_:1}),d(q,{prop:"ps",label:"模块描述"},{default:u((()=>[d(B,{modelValue:n(M).ps,"onUpdate:modelValue":t[1]||(t[1]=e=>n(M).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(M).args,"onUpdate:modelValue":t[2]||(t[2]=e=>n(M).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(E,{ref:"AceEditor",modelValue:n(M).init,"onUpdate:modelValue":t[3]||(t[3]=e=>n(M).init=e),class:"!h-[32rem] !w-[36rem]","editor-option":n(C)},null,8,["modelValue","editor-option"])])),_:1})])),_:1},8,["model","rules"])])])),_:1},8,["modelValue","onConfirm","onCancel"])])}}});export{C as default};
Save File
Cancel