|
|
+import{d as g,r as _,x as C,o as c,C as f,A as t,f as s,a as e,D as y,k as U,a1 as w,a8 as A,U as j,V as q,J as D,Y as J,__tla as R}from"./index-bdfd1c5a.js";import{_ as S,__tla as Y}from"./Dialog-6bd8b7c4.js";import{a as z,__tla as B}from"./index-2405e608.js";import{u as E,__tla as G}from"./useMessage-241a9f4d.js";let v,H=Promise.all([(()=>{try{return R}catch{}})(),(()=>{try{return Y}catch{}})(),(()=>{try{return B}catch{}})(),(()=>{try{return G}catch{}})()]).then(async()=>{v=g({name:"SystemAreaForm",__name:"AreaForm",setup(K,{expose:V}){const b=E(),u=_(!1),o=_(!1),a=_({ip:"",result:void 0}),h=C({ip:[{required:!0,message:"IP \u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),d=_();V({open:async()=>{u.value=!0,x()}});const P=async()=>{if(d&&await d.value.validate()){o.value=!0;try{a.value.result=await z(a.value.ip.trim()),b.success("\u67E5\u8BE2\u6210\u529F")}finally{o.value=!1}}},x=()=>{var i;a.value={ip:"",result:void 0},(i=d.value)==null||i.resetFields()};return(i,l)=>{const m=A,n=j,I=q,p=D,k=S,F=J;return c(),f(k,{modelValue:e(u),"onUpdate:modelValue":l[3]||(l[3]=r=>w(u)?u.value=r:null),title:"IP \u67E5\u8BE2"},{footer:t(()=>[s(p,{disabled:e(o),type:"primary",onClick:P},{default:t(()=>[y("\u786E \u5B9A")]),_:1},8,["disabled"]),s(p,{onClick:l[2]||(l[2]=r=>u.value=!1)},{default:t(()=>[y("\u53D6 \u6D88")]),_:1})]),default:t(()=>[U((c(),f(I,{ref_key:"formRef",ref:d,model:e(a),rules:e(h),"label-width":"80px"},{default:t(()=>[s(n,{label:"IP",prop:"ip"},{default:t(()=>[s(m,{modelValue:e(a).ip,"onUpdate:modelValue":l[0]||(l[0]=r=>e(a).ip=r),placeholder:"\u8BF7\u8F93\u5165 IP \u5730\u5740"},null,8,["modelValue"])]),_:1}),s(n,{label:"\u5730\u5740",prop:"result"},{default:t(()=>[s(m,{modelValue:e(a).result,"onUpdate:modelValue":l[1]||(l[1]=r=>e(a).result=r),placeholder:"\u5C55\u793A\u67E5\u8BE2 IP \u7ED3\u679C",readonly:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[F,e(o)]])]),_:1},8,["modelValue"])}}})});export{v as _,H as __tla};
|