import{c as a,aA as e,t as s,o as l,r as o,q as m,v as r,N as t,B as n,e as u,y as i,C as p,D as c,R as d,T as f,ab as _,G as b,a9 as v}from"./base-lib.js?v=1761009159";import{aP as y,P as g,he as h}from"./utils-lib.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";const j=a({__name:"container-rename",props:{compData:{default:()=>({})}},setup(a,{expose:j}){const{refreshActiveTable:C}=y(),D=e("popupClose"),k=a,{row:q}=s(k.compData),w=l({name:q.value.name}),V=o(),x={name:[{required:!0,message:"请输入容器名",trigger:["blur"]}]},A=async()=>{await V.value.validate(),g({loading:"正在保存，请稍候...",request:h({id:q.value.id,name:w.name}),message:!0,success:()=>{C(),D()}})};return m(async()=>{w.name=q.value.name}),j({onConfirm:A}),(a,e)=>{const s=f,l=_,o=b,m=v;return r(),t(m,{ref_key:"cmdFormRef",ref:V,model:i(w),rules:x,"label-position":"right",class:"mt-[1rem]",onSubmit:e[1]||(e[1]=d(()=>{},["prevent"]))},{default:n(()=>[u(l,{label:"新容器名",prop:"name"},{default:n(()=>[u(s,{autofocus:"",class:"!w-[24rem]",modelValue:i(w).name,"onUpdate:modelValue":e[0]||(e[0]=a=>i(w).name=a),placeholder:"请输入新容器名"},null,8,["modelValue"])]),_:1}),"dialog"!==a.compData.type?(r(),t(o,{key:0,class:"ml-[10rem]",title:"保存",type:"primary",onClick:A},{default:n(()=>e[2]||(e[2]=[p("保存",-1)])),_:1,__:[2]})):c("",!0)]),_:1},8,["model"])}}});export{j as default};
