import{_ as a}from"./index.vue_vue_type_script_setup_true_lang.js?v=1763625242172";import{_ as e}from"./index.vue_vue_type_script_setup_true_lang10.js?v=1763625242172";import{_ as t}from"./index.vue_vue_type_script_setup_true_lang2.js?v=1763625242172";import{cv as s}from"./page_layout.js?v=1763625242172";import"./public.js?v=1763625242172";import{a as p,b as l}from"./index263.js?v=1763625242172";import{i as r}from"./ftp.js?v=1763625242172";import{k as n,P as o,r as u,e as d,o as _,R as m,a2 as i,a3 as f,X as v,U as c,V as h,N as x}from"./vue.js?v=1763625242172";import{au as w,dP as b}from"./naive.js?v=1763625242172";import"./index98.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";const g={class:"w-330px"},j={class:"w-330px"},P={class:"w-330px"},y=n({__name:"index",props:{data:{}},setup(n,{expose:y}){const A=n,{t:I}=o(),U=s(),F=u(null),R=u(null),$=d({ftp_username:"",ftp_password:"",path:U.addPath,ps:""}),k={path:p(),ftp_password:l({complex:{length:6}}),ftp_username:{trigger:["blur","change"],validator:(a,e)=>0===e.length?new Error(I("Ftp.Add.Index_2")):/^[a-zA-Z0-9_]+$/g.test(e)?!(e.length<3)||new Error(I("Ftp.Add.Index_4")):new Error(I("Ftp.Add.Index_3"))}},E=()=>{const a=$.ftp_username;$.ps=a,a.length>0?$.path=U.addPath+"/"+a:$.path=U.addPath};_((()=>{var a;null==(a=R.value)||a.focus()}));return y({onConfirm:async()=>{var a,e,t;await(null==(a=F.value)?void 0:a.validate()),await r(x($)),null==(t=null==(e=A.data)?void 0:e.getList)||t.call(e),U.setRefresh(!0)}}),(s,p)=>{const l=w,r=b,n=t,o=e,u=a;return m(),i(u,{ref_key:"formRef",ref:F,model:h($),rules:k,class:"w-530px px-20px pt-24px pb-12px"},{default:f((()=>[v(r,{label:s.$t("Public.Table.Username"),path:"ftp_username"},{default:f((()=>[c("div",g,[v(l,{value:h($).ftp_username,"onUpdate:value":p[0]||(p[0]=a=>h($).ftp_username=a),ref_key:"usernameRef",ref:R,placeholder:"","input-props":{name:"username"},onInput:E},null,8,["value"])])])),_:1},8,["label"]),v(r,{label:s.$t("Public.Table.Password"),path:"ftp_password"},{default:f((()=>[c("div",j,[v(n,{value:h($).ftp_password,"onUpdate:value":p[1]||(p[1]=a=>h($).ftp_password=a),placeholder:"","input-props":{name:"password"}},null,8,["value"])])])),_:1},8,["label"]),v(r,{label:s.$t("Ftp.Add.Index_1"),path:"path"},{default:f((()=>[c("div",P,[v(o,{value:h($).path,"onUpdate:value":p[2]||(p[2]=a=>h($).path=a),placeholder:"","input-props":{name:"path"}},null,8,["value"])])])),_:1},8,["label"])])),_:1},8,["model"])}}});export{y as default};
