1 |
- import{w as s,bS as o}from"./index.fd765376.js";const u=s(!1),t="\u83B7\u53D6\u9A8C\u8BC1\u7801",a=s(null),l=s(t),D=()=>({isDisabled:u,timer:a,text:l,start:async(n,r,e=60)=>{if(!n)return;const v=o(e);await n.validateField(r,c=>{c&&(clearInterval(a.value),a.value=setInterval(()=>{e>0?(l.value=`${e}\u79D2\u540E\u91CD\u65B0\u83B7\u53D6`,u.value=!0,e-=1):(l.value=t,u.value=!1,clearInterval(a.value),e=v)},1e3))})},end:()=>{l.value=t,u.value=!1,clearInterval(a.value)}});export{D as u};
|