import{l as e,K as s,N as a,t as r,x as t,dU as l}from"./utils-lib.js?v=20260328163632";import{B as u}from"./index85.js?v=20260328163632";import{g as i}from"./index64.js?v=20260328163632";import{k as o,r as d,O as p,c as n,o as m,V as b,_,Y as c}from"./base-lib.js?v=20260328163632";import"./naive-ui.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.js?v=20260328163632";import"./index91.js?v=20260328163632";import"./index.vue_vue_type_script_setup_true_lang5.js?v=20260328163632";import"./database.js?v=20260328163632";const v=o({__name:"add-gbase8s",setup(o,{expose:v}){const g={labelStyle:"min-width: 100px"},j=d({label:e("数据库名"),attrs:g,ruleKey:"db_name",rules:[s({message:e("请输入数据库名"),trigger:["blur","input"]})],children:[{type:"input",key:"db_name",attrs:{class:"!w-340px",placeholder:e("新的数据库名称"),onInput:e=>{k.value.db_user=e,k.value.ps=e}}}]}),x=d({label:e("用户名"),attrs:g,ruleKey:"db_user",rules:[s({message:e("请输入数据库用户名"),trigger:["blur","input"]})],children:[{type:"input",key:"db_user",attrs:{class:"!w-340px",placeholder:e("请输入数据库用户名")}}]}),y=d({label:e("密码"),attrs:g,ruleKey:"db_password",rules:[s({message:e("请输入密码"),trigger:["blur","input"]})],children:[{type:"custom",key:"db_password",render:()=>p(u,{width:"300px",icon:"el-refresh",modelValue:k.value.db_password,"onUpdate:modelValue":e=>k.value.db_password=e,onIconClick:()=>k.value.db_password=a(16),isActive:!0},null)}]}),w=d({formAttrs:{labelWidth:"auto"},formItems:[]}),f=n((()=>(w.value.formItems=[j.value,x.value,y.value],w.value))),[h,k,I]=r(f);return m((()=>{Object.assign(k.value,{db_name:"",db_user:""})})),v({onConfirm:async()=>{var s;await(null==(s=I.value)?void 0:s.validate());const a=await t({loading:e("正在添加数据库"),request:l(k.value),message:!0});return a.status&&i(),a.status}}),(e,s)=>(b(),_(c(h),{class:"p-20px"}))}});export{v as default};
