| 1 |
- import{bF as c,c as h,b as S,m as g,t as _,d as r,ag as x,e as f,w,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-be2899bb.js";function H(e,n){const{days:s}=n;let{hours:t,minutes:a,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)):a+=t*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,z]=h("count-down"),F={time:S(0),format:g("HH:mm:ss"),autoStart:_,millisecond:Boolean};var M=r({name:k,props:F,emits:["change","finish"],setup(e,{emit:n,slots:s}){const{start:t,pause:a,reset:l,current:u}=x({time:+e.time,millisecond:e.millisecond,onChange:m=>n("change",m),onFinish:()=>n("finish")}),o=f(()=>H(e.format,u.value)),d=()=>{l(+e.time),e.autoStart&&t()};return w(()=>e.time,d,{immediate:!0}),v({start:t,pause:a,reset:d}),()=>i("div",{role:"timer",class:z()},[s.default?s.default(u.value):o.value])}});const I=C(M),N="_wxPopupDialog_iw1zn_1",O="_popupContainer_iw1zn_16",W="_title1_iw1zn_24",Z="_popupTips_iw1zn_31",A="_button_iw1zn_38",p={wxPopupDialog:N,popupContainer:O,title1:W,popupTips:Z,button:A},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=D(!1);return b(()=>{if(!y().weixin&&e.show){s.value=!0;return}}),w(()=>[e.show,e.message],()=>{e.show?s.value=!0:s.value=!1}),()=>i(B,null,[i(P,{show:s.value,"onUpdate:show":t=>s.value=t,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{I as C,R as M};
|