phone.919a39.js 2.1 KB

1
  1. import{_ as F,d as b,x as v,Z as B,r as i,o as g,G as w,D as o,l as e,m as t,J as y,h as D,M as c,L as E,ad as R}from"./index.js";import{M as d}from"./motion.6a462330.js";import{p as U}from"./rule.9287b9d2.js";import{E as N}from"./index.29a6d90d.js";import{u as _}from"./verifyCode.bd1f9cdb.js";const T={class:"w-full flex justify-between"},z=b({__name:"phone",setup(A){const s=v(!1),a=B({phone:"",verifyCode:""}),f=v(),{isDisabled:C,text:x}=_(),h=async p=>{s.value=!0,p&&await p.validate((l,u)=>{if(l)setTimeout(()=>{N.success("\u767B\u5F55\u6210\u529F"),s.value=!1},2e3);else return s.value=!1,u})};function k(){_().end(),R().SET_CURRENTPAGE(0)}return(p,l)=>{const u=i("el-input"),r=i("el-form-item"),m=i("el-button"),V=i("el-form");return g(),w(V,{ref_key:"ruleFormRef",ref:f,model:a,rules:t(U),size:"large"},{default:o(()=>[e(t(d),null,{default:o(()=>[e(r,{prop:"phone"},{default:o(()=>[e(u,{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(()=>[D("div",T,[e(u,{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(m,{disabled:t(C),class:"ml-2",onClick:l[2]||(l[2]=n=>t(_)().start(f.value,"phone"))},{default:o(()=>[c(E(t(x)),1)]),_:1},8,["disabled"])])]),_:1})]),_:1}),e(t(d),{delay:150},{default:o(()=>[e(r,null,{default:o(()=>[e(m,{class:"w-full",size:"default",type:"primary",loading:s.value,onClick:l[3]||(l[3]=n=>h(f.value))},{default:o(()=>[c(" \u767B\u5F55 ")]),_:1},8,["loading"])]),_:1})]),_:1}),e(t(d),{delay:200},{default:o(()=>[e(r,null,{default:o(()=>[e(m,{class:"w-full",size:"default",onClick:k},{default:o(()=>[c(" \u8FD4\u56DE ")]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])}}});var $=F(z,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/login/components/phone.vue"]]);export{$ as default};