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