phone.7f2e2807.js 2.1 KB

1
  1. import{_ as b,d as F,E as v,a7 as g,x as i,o as w,N as B,K as o,y as e,u as t,R as y,b as E,W as _,T as R,ag as D}from"./index.743f0c80.js";import{M as d}from"./motion.9c8e671a.js";import{p as N}from"./rule.3e7442a7.js";import{E as T}from"./index.1a7fa494.js";import{u as m}from"./verifyCode.6fe12377.js";const U={class:"w-full flex justify-between"},z=_(" \u767B\u5F55 "),A=_(" \u8FD4\u56DE "),S=F({__name:"phone",setup(M){const u=v(!1),a=g({phone:"",verifyCode:""}),f=v(),{isDisabled:C,text:x}=m(),h=async p=>{u.value=!0,p&&await p.validate((l,s)=>{if(l)setTimeout(()=>{T.success("\u767B\u5F55\u6210\u529F"),u.value=!1},2e3);else return u.value=!1,s})};function k(){m().end(),D().SET_CURRENTPAGE(0)}return(p,l)=>{const s=i("el-input"),r=i("el-form-item"),c=i("el-button"),V=i("el-form");return w(),B(V,{ref_key:"ruleFormRef",ref:f,model:a,rules:t(N),size:"large"},{default:o(()=>[e(t(d),null,{default:o(()=>[e(r,{prop:"phone"},{default:o(()=>[e(s,{clearable:"",modelValue:a.phone,"onUpdate:modelValue":l[0]||(l[0]=n=>a.phone=n),placeholder:"\u624B\u673A\u53F7\u7801","prefix-icon":t(y)("iphone")},null,8,["modelValue","prefix-icon"])]),_:1})]),_:1}),e(t(d),{delay:100},{default:o(()=>[e(r,{prop:"verifyCode"},{default:o(()=>[E("div",U,[e(s,{clearable:"",modelValue:a.verifyCode,"onUpdate:modelValue":l[1]||(l[1]=n=>a.verifyCode=n),placeholder:"\u77ED\u4FE1\u9A8C\u8BC1\u7801","prefix-icon":t(y)("ri:shield-keyhole-line",{online:!0})},null,8,["modelValue","prefix-icon"]),e(c,{disabled:t(C),class:"ml-2",onClick:l[2]||(l[2]=n=>t(m)().start(f.value,"phone"))},{default:o(()=>[_(R(t(x)),1)]),_:1},8,["disabled"])])]),_:1})]),_:1}),e(t(d),{delay:150},{default:o(()=>[e(r,null,{default:o(()=>[e(c,{class:"w-full",size:"default",type:"primary",loading:u.value,onClick:l[3]||(l[3]=n=>h(f.value))},{default:o(()=>[z]),_:1},8,["loading"])]),_:1})]),_:1}),e(t(d),{delay:200},{default:o(()=>[e(r,null,{default:o(()=>[e(c,{class:"w-full",size:"default",onClick:k},{default:o(()=>[A]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])}}});var K=b(S,[["__file","D:/work/accout-vue3-ui/src/views/login/components/phone.vue"]]);export{K as default};