import{f as t,g as o,w as e,m as l,t as s,i as a,E as r,n as i,H as d,K as u,l as n}from"./index-007bf156.js";import{_ as y}from"./_plugin-vue_export-helper.1b428a4d.js";const c=y({name:"countDown",props:{justifyLeft:{type:String,default:""},tipText:{type:String,default:"倒计时"},dayText:{type:String,default:"天"},hourText:{type:String,default:"时"},minuteText:{type:String,default:"分"},secondText:{type:String,default:"秒"},datatime:{type:Number,default:0},isDay:{type:Boolean,default:!0},isCol:{type:Boolean,default:!1},bgColor:{type:Object,default:null}},data:function(){return{day:"00",hour:"00",minute:"00",second:"00"}},created:function(){this.show_time()},mounted:function(){},methods:{show_time:function(){let t=this;function o(){let o=t.datatime-Date.parse(new Date)/1e3,e=0,l=0,s=0,a=0;o>0?(e=!0===t.isDay?Math.floor(o/86400):0,l=Math.floor(o/3600)-24*e,s=Math.floor(o/60)-24*e*60-60*l,a=Math.floor(o)-24*e*60*60-60*l*60-60*s,l<=9&&(l="0"+l),s<=9&&(s="0"+s),a<=9&&(a="0"+a),t.day=e,t.hour=l,t.minute=s,t.second=a):(t.day="00",t.hour="00",t.minute="00",t.second="00")}o(),setInterval(o,1e3)}}},[["render",function(y,c,C,f,g,b){const h=u,m=n;return t(),o(m,{class:"time",style:r(C.justifyLeft)},{default:e((()=>[C.tipText?(t(),o(h,{key:0,class:""},{default:e((()=>[l(s(C.tipText),1)])),_:1})):a("",!0),!0===C.isDay?(t(),o(h,{key:1,class:"styleAll p6",style:r({background:C.bgColor.bgColor,color:C.bgColor.Color})},{default:e((()=>[l(s(y.day)+s(C.bgColor.isDay?"天":""),1)])),_:1},8,["style"])):a("",!0),C.dayText?(t(),o(h,{key:2,class:"timeTxt",style:r({width:C.bgColor.timeTxtwidth,color:C.bgColor.bgColor})},{default:e((()=>[l(s(C.dayText),1)])),_:1},8,["style"])):a("",!0),i(h,{class:d(["styleAll",C.isCol?"timeCol":""]),style:r({background:C.bgColor.bgColor,color:C.bgColor.Color,width:C.bgColor.width})},{default:e((()=>[l(s(y.hour),1)])),_:1},8,["class","style"]),C.hourText?(t(),o(h,{key:3,class:d(["timeTxt",C.isCol?"whit":""]),style:r({width:C.bgColor.timeTxtwidth,color:C.bgColor.bgColor})},{default:e((()=>[l(s(C.hourText),1)])),_:1},8,["class","style"])):a("",!0),i(h,{class:d(["styleAll",C.isCol?"timeCol":""]),style:r({background:C.bgColor.bgColor,color:C.bgColor.Color,width:C.bgColor.width})},{default:e((()=>[l(s(y.minute),1)])),_:1},8,["class","style"]),C.minuteText?(t(),o(h,{key:4,class:d(["timeTxt",C.isCol?"whit":""]),style:r({width:C.bgColor.timeTxtwidth,color:C.bgColor.bgColor})},{default:e((()=>[l(s(C.minuteText),1)])),_:1},8,["class","style"])):a("",!0),i(h,{class:d(["styleAll",C.isCol?"timeCol":""]),style:r({background:C.bgColor.bgColor,color:C.bgColor.Color,width:C.bgColor.width})},{default:e((()=>[l(s(y.second),1)])),_:1},8,["class","style"]),C.secondText?(t(),o(h,{key:5,class:"timeTxt"},{default:e((()=>[l(s(C.secondText),1)])),_:1})):a("",!0)])),_:1},8,["style"])}],["__scopeId","data-v-cfad19b9"]]);export{c as _};
