phone.9e1123.js 2.1 KB

1
  1. import{_ as b,d as B,m as v,Q as g,r as i,o as w,A as D,x as l,f as o,h as t,D as y,e as E,H as _,G as h,au as R}from"./index.js";import{M as d}from"./motion.cd0ccb33.js";import{p as U}from"./rule.5457d3e8.js";import{u as c,E as A}from"./verifyCode.becfe670.js";const N={class:"w-full flex justify-between"},T=B({__name:"phone",setup(z){const a=v(!1),n=g({phone:"",verifyCode:""}),f=v(),{isDisabled:C,text:x}=c(),k=async p=>{a.value=!0,p&&await p.validate((e,u)=>{if(e)setTimeout(()=>{A.success("\u767B\u5F55\u6210\u529F"),a.value=!1},2e3);else return a.value=!1,u})};function V(){c().end(),R().SET_CURRENTPAGE(0)}return(p,e)=>{const u=i("el-input"),r=i("el-form-item"),m=i("el-button"),F=i("el-form");return w(),D(F,{ref_key:"ruleFormRef",ref:f,model:n,rules:t(U),size:"large"},{default:l(()=>[o(t(d),null,{default:l(()=>[o(r,{prop:"phone"},{default:l(()=>[o(u,{clearable:"",modelValue:n.phone,"onUpdate:modelValue":e[0]||(e[0]=s=>n.phone=s),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",N,[o(u,{clearable:"",modelValue:n.verifyCode,"onUpdate:modelValue":e[1]||(e[1]=s=>n.verifyCode=s),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]=s=>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:a.value,onClick:e[3]||(e[3]=s=>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 M=b(T,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/login/components/phone.vue"]]);export{M as default};