webpackJsonp([15],{bJDk:function(s,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=t("Au9i"),a={mixins:[t("5g4Q").a],data:function(){return{progressConf1:{value:50,barHeight:2},progressConf2:{value:20,barHeight:5},progressConf3:{flag:!1,pause:!1,pauseText:"暂停",timer:null,value:0,barHeight:5,disabled:!1}}},computed:{showValue:function(){return this.progressConf3.value.toFixed(2)+"%"}},methods:{upload:function(){setTimeout(function(){Object(o.Toast)({message:"正在使用4G",position:"bottom",duration:3e3})},1e3),this.progressConf3.flag=!0,this.progressConf3.disabled=!0,this.timerHandle()},pauseUpload:function(){this.progressConf3.pause=!this.progressConf3.pause,this.progressConf3.pauseText=this.progressConf3.pause?"继续":"暂停",this.progressConf3.pause?(clearInterval(this.progressConf3.timer),this.progressConf3.timer=null):this.timerHandle()},abolishUpload:function(){this.progressConf3.value=0,this.progressConf3.flag=!1,this.progressConf3.disabled=!1,clearInterval(this.progressConf3.timer),Object(o.Toast)({message:"已取消",iconClass:"iconfont icon-caozuochenggong"})},timerHandle:function(){var s=this;this.progressConf3.timer=setInterval(function(){s.progressConf3.value+=Math.random(),s.progressConf3.value>=100&&(clearInterval(s.progressConf3.timer),s.progressConf3.timer=null,s.progressConf3.value=0,s.progressConf3.flag=!1,s.progressConf3.disabled=!1,Object(o.Toast)({message:"上传完成",iconClass:"iconfont icon-caozuochenggong"}),setTimeout(function(){Object(o.Toast)({message:"您的流量已不足",position:"bottom",duration:3e3})},1e3))},50)}}},r={render:function(){var s=this,e=s.$createElement,t=s._self._c||e;return t("transition",{attrs:{name:"slide"}},[t("div",{staticClass:"progress",attrs:{id:"lazyLoad"}},[t("mt-header",{staticClass:"header",attrs:{title:"Progress",fixed:s.headerConf.fixed}},[t("div",{attrs:{slot:"left"},slot:"left"},[t("mt-button",{attrs:{icon:"back"},on:{click:s.back}},[s._v("返回")])],1)]),s._v(" "),t("div",{ref:"content",staticClass:"content"},[t("div",{staticClass:"row"},[t("div",{staticClass:"title"},[s._v("基本功能")]),s._v(" "),t("div",{staticClass:"row-container flex-row"},[t("div",{staticClass:"desc flex-1"},[s._v("\n            默认\n          ")]),s._v(" "),t("div",{staticClass:"flex-2"},[t("mt-progress",{staticClass:"progress-box",attrs:{value:s.progressConf1.value,"bar-height":s.progressConf1.barHeight}})],1)]),s._v(" "),t("div",{staticClass:"row-container flex-row"},[t("div",{staticClass:"desc flex-1"},[s._v("\n            左右文字\n          ")]),s._v(" "),t("div",{staticClass:" flex-2"},[t("mt-progress",{staticClass:"progress-box",attrs:{value:s.progressConf2.value,"bar-height":s.progressConf2.barHeight}},[t("div",{staticClass:"slot",attrs:{slot:"start"},slot:"start"},[s._v("0%")]),s._v(" "),t("div",{staticClass:"slot",attrs:{slot:"end"},slot:"end"},[s._v("100%")])])],1)])]),s._v(" "),t("mt-button",{staticClass:"upload",attrs:{type:"primary",disabled:s.progressConf3.disabled},on:{click:s.upload}},[s._v("\n        上传文件\n      ")]),s._v(" "),t("mt-progress",{directives:[{name:"show",rawName:"v-show",value:s.progressConf3.flag,expression:"progressConf3.flag"}],staticClass:"progress-box progress-upload",attrs:{value:s.progressConf3.value}},[t("div",{staticClass:"slot",attrs:{slot:"end"},slot:"end"},[s._v(s._s(s.showValue))])]),s._v(" "),t("mt-button",{directives:[{name:"show",rawName:"v-show",value:s.progressConf3.flag,expression:"progressConf3.flag"}],staticClass:"upload",attrs:{type:"default",disabled:!s.progressConf3.disabled},on:{click:s.pauseUpload}},[s._v("\n        "+s._s(s.progressConf3.pauseText)+"\n      ")]),s._v(" "),t("mt-button",{directives:[{name:"show",rawName:"v-show",value:s.progressConf3.flag,expression:"progressConf3.flag"}],staticClass:"upload",attrs:{type:"danger",disabled:!s.progressConf3.disabled},on:{click:s.abolishUpload}},[s._v("\n        取消上传\n      ")])],1)],1)])},staticRenderFns:[]};var n=t("VU/8")(a,r,!1,function(s){t("zbOy")},"data-v-7891802a",null);e.default=n.exports},zbOy:function(s,e){}});
//# sourceMappingURL=15.c27b0578494c61126610.js.map