AreaForm-990b2936.js 2.0 KB

1
  1. import{d as F,r as i,f as k,o as f,x as c,w as t,g as s,a as e,n as y,y as A,P as U,W as z,B as C,G as D,D as j,J as q,_ as B,__tla as G}from"./index-b362e1d5.js";import{_ as J,__tla as R}from"./Dialog-71bebaff.js";import{a as S,__tla as W}from"./index-75393ea1.js";import{u as E,__tla as H}from"./useMessage-7c1dd10e.js";let v,K=Promise.all([(()=>{try{return G}catch{}})(),(()=>{try{return R}catch{}})(),(()=>{try{return W}catch{}})(),(()=>{try{return H}catch{}})()]).then(async()=>{v=B(F({name:"SystemAreaForm",__name:"AreaForm",setup(L,{expose:V}){const h=E(),u=i(!1),o=i(!1),a=i({ip:"",result:void 0}),b=k({ip:[{required:!0,message:"IP \u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),d=i();V({open:async()=>{u.value=!0,P()}});const x=async()=>{if(d&&await d.value.validate()){o.value=!0;try{a.value.result=await S(a.value.ip.trim()),h.success("\u67E5\u8BE2\u6210\u529F")}finally{o.value=!1}}},P=()=>{var _;a.value={ip:"",result:void 0},(_=d.value)==null||_.resetFields()};return(_,l)=>{const m=z,n=C,w=D,p=j,I=J,g=q;return f(),c(I,{modelValue:e(u),"onUpdate:modelValue":l[3]||(l[3]=r=>U(u)?u.value=r:null),title:"IP \u67E5\u8BE2"},{footer:t(()=>[s(p,{disabled:e(o),type:"primary",onClick:x},{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(()=>[A((f(),c(w,{ref_key:"formRef",ref:d,model:e(a),rules:e(b),"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"])),[[g,e(o)]])]),_:1},8,["modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/area/AreaForm.vue"]])});export{K as __tla,v as default};