1 line
8.2 KiB
JavaScript
1 line
8.2 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[14,9,18],{488:function(t,e,n){var content=n(491);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(18).default)("d7ac674a",content,!0,{sourceMap:!1})},489:function(t,e,n){"use strict";n.r(e);n(300);var o={data:function(){return{priceSlice:{}}},components:{},props:{firstSize:{type:Number,default:14},secondSize:{type:Number,default:14},color:{type:String},weight:{type:[String,Number],default:400},price:{type:[String,Number],default:""},showSubscript:{type:Boolean,default:!0},subscriptSize:{type:Number,default:14},lineThrough:{type:Boolean,default:!1}},created:function(){this.priceFormat()},watch:{price:function(t){this.priceFormat()}},methods:{priceFormat:function(){var t=this.price,e={};null!==t&&(t=String(t).split("."),e.first=t[0],e.second=t[1],this.priceSlice=e)}}},r=(n(490),n(9)),component=Object(r.a)(o,(function(){var t=this,e=t._self._c;return e("span",{class:(t.lineThrough?"line-through":"")+"price-format",style:{color:t.color,"font-weight":t.weight}},[t.showSubscript?e("span",{style:{"font-size":t.subscriptSize+"px","margin-right":"1px"}},[t._v("¥")]):t._e(),t._v(" "),e("span",{style:{"font-size":t.firstSize+"px","margin-right":"1px"}},[t._v(t._s(t.priceSlice.first))]),t._v(" "),t.priceSlice.second?e("span",{style:{"font-size":t.secondSize+"px"}},[t._v("."+t._s(t.priceSlice.second))]):t._e()])}),[],!1,null,null,null);e.default=component.exports},490:function(t,e,n){"use strict";n(488)},491:function(t,e,n){var o=n(17)((function(i){return i[1]}));o.push([t.i,".price-format{align-items:baseline;display:flex}",""]),o.locals={},t.exports=o},496:function(t,e,n){"use strict";n.r(e);n(300),n(87),n(63),n(12),n(47),n(39),n(88);var o=6e4,r=36e5,l=24*r;function c(t){return(0+t.toString()).slice(-2)}var d={components:{},props:{isSlot:{type:Boolean,default:!1},time:{type:Number,default:0},format:{type:String,default:"hh:mm:ss"},autoStart:{type:Boolean,default:!0}},watch:{time:{immediate:!0,handler:function(t){t&&this.reset()}}},data:function(){return{timeObj:{},formateTime:0}},created:function(){},computed:{},methods:{createTimer:function(t){return setTimeout(t,100)},isSameSecond:function(t,e){return Math.floor(t)===Math.floor(e)},start:function(){this.counting||(this.counting=!0,this.endTime=Date.now()+1e3*this.remain,this.setTimer())},setTimer:function(){var t=this;this.tid=this.createTimer((function(){var e=t.getRemain();t.isSameSecond(e,t.remain)&&0!==e||t.setRemain(e),0!==t.remain&&t.setTimer()}))},getRemain:function(){return Math.max(this.endTime-Date.now(),0)},pause:function(){this.counting=!1,clearTimeout(this.tid)},reset:function(){this.pause(),this.remain=this.time,this.setRemain(this.remain),this.autoStart&&this.start()},setRemain:function(t){var e=this.format;this.remain=t;var time,n=(time=t,{days:Math.floor(time/l),hours:c(Math.floor(time%l/r)),minutes:c(Math.floor(time%r/o)),seconds:c(Math.floor(time%o/1e3))});this.formateTime=function(t,e){var n=e.days,o=e.hours,r=e.minutes,l=e.seconds;return-1!==t.indexOf("dd")&&(t=t.replace("dd",n)),-1!==t.indexOf("hh")&&(t=t.replace("hh",c(o))),-1!==t.indexOf("mm")&&(t=t.replace("mm",c(r))),-1!==t.indexOf("ss")&&(t=t.replace("ss",c(l))),t}(e,n),this.$emit("change",n),0===t&&(this.pause(),this.$emit("finish"))}}},f=n(9),component=Object(f.a)(d,(function(){var t=this,e=t._self._c;return t.time>=0?e("div",[e("client-only",[t.isSlot?t._t("default"):e("span",[t._v(t._s(t.formateTime))])],2)],1):t._e()}),[],!1,null,null,null);e.default=component.exports},516:function(t,e,n){"use strict";var o=n(2),r=n(110).findIndex,l=n(194),c="findIndex",d=!0;c in[]&&Array(1)[c]((function(){d=!1})),o({target:"Array",proto:!0,forced:d},{findIndex:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),l(c)},541:function(t,e,n){var content=n(560);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(18).default)("7a59a7e0",content,!0,{source
|