import{K as s,hB as a,M as e,c4 as t}from"./utils-lib.js?v=1761009159";import{c as r,aA as m,r as o,v as p,x as i,e as l,y as c}from"./base-lib.js?v=1761009159";import{k as u}from"./form-item.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";const d={class:"flex flex-col p-[1.6rem] lib-box"},n=r({__name:"update-password",props:{compData:{default:()=>({id:"",path:"",isInit:!1,service_name:""})}},setup(r,{expose:n}){const _=r,b=m("popupClose",()=>{}),{BtForm:f,submit:q}=s({data:()=>({mysql_path:"".concat(_.compData.path,"/").concat(_.compData.service_name).replace(/\/+/g,"/"),mysql_pwd:"",id:_.compData.id}),options:s=>o([u("新密码","mysql_pwd",{attrs:{class:"!w-[24rem]",placeholder:"请输入新密码"},rules:[{required:!0,message:"请输入新密码",trigger:["blur"]},{min:8,message:"密码长度至少8位",trigger:["blur"]},{validator:(s,a,e)=>{/"|[\u4e00-\u9fa5]/.test(a)?e(new Error("密码不能包含特殊字符")):e()},trigger:["blur"]}]},()=>{s.value.mysql_pwd=t(16)})]),submit:async(s,t,r)=>{await t();const m=await a({id:s.value.id,mysql_pwd:s.value.mysql_pwd,mysql_path:s.value.mysql_path});e.request(m),m.status&&b()}});return n({onConfirm:q}),(s,a)=>(p(),i("div",d,[l(c(f))]))}});export{n as default};
