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