File: /www/server/panel/BTPanel/static/js/set-docker-path-dialog.js
import{c as e,h as a,r as s,o,k as t,J as l,x as r,e as p,p as m,N as i,a7 as c,a4 as n}from"./base-lib.js?v=1777008528";import{_ as d}from"./index101.js?v=1777008528";import{f as u}from"./validator.js?v=1777008528";import{I as h,e as f}from"./utils-lib.js?v=1777008528";import{g as _,bw as g}from"./useStore4.js?v=1777008528";import"./__commonjsHelpers__.js?v=1777008528";import"./index104.js?v=1777008528";import"./column.js?v=1777008528";const j=f(e({__name:"set-docker-path-dialog",props:{compData:{default:()=>({})}},emits:["close"],setup(e,{expose:f,emit:j}){const b=j,{refs:{settingData:v},getSet:k}=_(),x=a({path:""}),y=s(),w={path:[{required:!0,message:"请选择compose文件路径",trigger:["blur"]}]},S=()=>{u({type:"file",path:x.path,change:e=>x.path=e})};return f({onConfirm:async()=>{try{await y.value.validate(),h({request:g({data:JSON.stringify({docker_compose_path:x.path})}),loading:"正在设置,请稍候...",message:!0,success:({status:e})=>{e&&(k(),b("close"))}})}catch(e){console.log(e)}}}),o((()=>{x.path=v.value.docker_compose_path})),(e,a)=>{const s=d,o=c,u=n;return t(),l(u,{ref_key:"cmdFormRef",ref:y,size:"small",model:m(x),rules:w,class:"relative w-full p-[1.6rem]","label-position":"right",onSubmit:a[2]||(a[2]=i((()=>{}),["prevent"]))},{default:r((()=>[p(o,{prop:"path",label:"路径"},{default:r((()=>[p(s,{modelValue:m(x).path,"onUpdate:modelValue":a[0]||(a[0]=e=>m(x).path=e),class:"!w-[24rem]",icon:"el-folder-opened",onIconClick:S,onChangePassive:a[1]||(a[1]=e=>{x.path=x.path.replace(/\s+/g,"")}),placeholder:"请选择compose文件路径"},null,8,["modelValue"])])),_:1})])),_:1},8,["model"])}}}),[["__scopeId","data-v-ce36f593"]]);export{j as default};