1 |
- import{bF as c,c as h,b as S,m as f,t as g,d as r,ag as _,e as x,w as m,Z as v,a as i,k as C,r as D,y as b,S as y,R as P,C as T,F as B}from"./index-0f430fcc.js";function H(e,n){const{days:t}=n;let{hours:s,minutes:a,seconds:l,milliseconds:u}=n;if(e.includes("DD")?e=e.replace("DD",c(t)):s+=t*24,e.includes("HH")?e=e.replace("HH",c(s)):a+=s*60,e.includes("mm")?e=e.replace("mm",c(a)):l+=a*60,e.includes("ss")?e=e.replace("ss",c(l)):u+=l*1e3,e.includes("S")){const o=c(u,3);e.includes("SSS")?e=e.replace("SSS",o):e.includes("SS")?e=e.replace("SS",o.slice(0,2)):e=e.replace("S",o.charAt(0))}return e}const[k,q]=h("count-down"),z={time:S(0),format:f("HH:mm:ss"),autoStart:g,millisecond:Boolean};var F=r({name:k,props:z,emits:["change","finish"],setup(e,{emit:n,slots:t}){const{start:s,pause:a,reset:l,current:u}=_({time:+e.time,millisecond:e.millisecond,onChange:w=>n("change",w),onFinish:()=>n("finish")}),o=x(()=>H(e.format,u.value)),d=()=>{l(+e.time),e.autoStart&&s()};return m(()=>e.time,d,{immediate:!0}),v({start:s,pause:a,reset:d}),()=>i("div",{role:"timer",class:q()},[t.default?t.default(u.value):o.value])}});const E=C(F),M="_wxPopupDialog_tpzfq_1",N="_popupContainer_tpzfq_17",O="_title1_tpzfq_25",W="_popupTips_tpzfq_32",Z="_button_tpzfq_39",p={wxPopupDialog:M,popupContainer:N,title1:O,popupTips:W,button:Z},I=r({name:"m-wx-tip",props:{show:{type:Boolean,default:!0},title:{type:String,default:"温馨提示"},message:{type:String,default:"请使用微信打开"},showButton:{type:Boolean,default:!1},buttonText:{type:String,default:"确定"}},emits:["confirm"],setup(e,{emit:n}){const t=D(!1);return b(()=>{if(!y().weixin&&e.show){t.value=!0;return}}),m(()=>[e.show,e.message],()=>{e.show?t.value=!0:t.value=!1}),()=>i(B,null,[i(P,{show:t.value,"onUpdate:show":s=>t.value=s,round:!0,style:{width:"70%",maxWidth:"520px"},closeOnClickOverlay:!1,class:p.wxPopupDialog},{default:()=>[i("div",{class:p.popupContainer},[i("p",{class:p.title1},[e.title]),i("p",{class:p.popupTips},[e.message]),e.showButton&&i(T,{round:!0,class:p.button,onClick:()=>n("confirm")},{default:()=>[e.buttonText]})])]})])}});export{E as C,I as M};
|