1 |
- import{bJ as c,c as h,b as S,m as v,t as _,d as r,af as b,e as g,w as m,Z as f,a,k as x,r as C,y as D,R as y,Q as P,C as T,F as B}from"./index-521a9826.js";function H(e,n){const{days:s}=n;let{hours:t,minutes:i,seconds:l,milliseconds:u}=n;if(e.includes("DD")?e=e.replace("DD",c(s)):t+=s*24,e.includes("HH")?e=e.replace("HH",c(t)):i+=t*60,e.includes("mm")?e=e.replace("mm",c(i)):l+=i*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,F]=h("count-down"),M={time:S(0),format:v("HH:mm:ss"),autoStart:_,millisecond:Boolean};var N=r({name:k,props:M,emits:["change","finish"],setup(e,{emit:n,slots:s}){const{start:t,pause:i,reset:l,current:u}=b({time:+e.time,millisecond:e.millisecond,onChange:w=>n("change",w),onFinish:()=>n("finish")}),o=g(()=>H(e.format,u.value)),d=()=>{l(+e.time),e.autoStart&&t()};return m(()=>e.time,d,{immediate:!0}),f({start:t,pause:i,reset:d}),()=>a("div",{role:"timer",class:F()},[s.default?s.default(u.value):o.value])}});const Q=x(N),O="_wxPopupDialog_1avbm_1",Z="_popupContainer_1avbm_16",A="_title1_1avbm_24",E="_popupTips_1avbm_31",I="_button_1avbm_39",p={wxPopupDialog:O,popupContainer:Z,title1:A,popupTips:E,button:I},R=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 s=C(!1);return D(()=>{if(!y().weixin&&e.show){s.value=!0;return}}),m(()=>[e.show,e.message],()=>{e.show?s.value=!0:s.value=!1}),()=>a(B,null,[a(P,{show:s.value,"onUpdate:show":t=>s.value=t,round:!0,style:{width:"88%"},closeOnClickOverlay:!1,class:p.wxPopupDialog},{default:()=>[a("div",{class:p.popupContainer},[a("p",{class:p.title1},[e.title]),a("p",{class:p.popupTips},[e.message]),e.showButton&&a(T,{round:!0,class:p.button,onClick:()=>n("confirm")},{default:()=>[e.buttonText]})])]})])}});export{Q as C,R as M};
|