1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-order_details-index~pages-plantGrass-plant_detail-index~pages-plantGrass-plant_featured-index~~cbf5ccae"],{"222c":function(t,n,i){"use strict";i.r(n);var e=i("83f4"),o=i.n(e);for(var a in e)["default"].indexOf(a)<0&&function(t){i.d(n,t,(function(){return e[t]}))}(a);n["default"]=o.a},"4a7f":function(t,n,i){var e=i("c738");e.__esModule&&(e=e.default),"string"===typeof e&&(e=[[t.i,e,""]]),e.locals&&(t.exports=e.locals);var o=i("967d").default;o("aa8962cc",e,!0,{sourceMap:!1,shadowMode:!1})},"554d":function(t,n,i){"use strict";i("6a54");var e=i("f5bd").default;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=e(i("b7c7")),a=e(i("fcf3")),s=e(i("9b1b"));i("64aa"),i("bf0f"),i("2797"),i("c223"),i("5c47"),i("a1c1");var r=i("77e6"),c={name:"uniTransition",emits:["click","change"],props:{show:{type:Boolean,default:!1},modeClass:{type:[Array,String],default:function(){return"fade"}},duration:{type:Number,default:300},styles:{type:Object,default:function(){return{}}},customClass:{type:String,default:""}},data:function(){return{isShow:!1,transform:"",opacity:1,animationData:{},durationTime:300,config:{}}},watch:{show:{handler:function(t){t?this.open():this.isShow&&this.close()},immediate:!0}},computed:{stylesObject:function(){var t=(0,s.default)((0,s.default)({},this.styles),{},{"transition-duration":this.duration/1e3+"s"}),n="";for(var i in t){var e=this.toLine(i);n+=e+":"+t[i]+";"}return n},transformStyles:function(){return"transform:"+this.transform+";opacity:"+this.opacity+";"+this.stylesObject}},created:function(){this.config={duration:this.duration,timingFunction:"ease",transformOrigin:"50% 50%",delay:0},this.durationTime=this.duration},methods:{init:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.duration&&(this.durationTime=t.duration),this.animation=(0,r.createAnimation)(Object.assign(this.config,t))},onClick:function(){this.$emit("click",{detail:this.isShow})},step:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.animation){for(var i in t)try{var e;if("object"===(0,a.default)(t[i]))(e=this.animation)[i].apply(e,(0,o.default)(t[i]));else this.animation[i](t[i])}catch(s){}return this.animation.step(n),this}},run:function(t){this.animation&&this.animation.run(t)},open:function(){var t=this;clearTimeout(this.timer),this.transform="",this.isShow=!0;var n=this.styleInit(!1),i=n.opacity,e=n.transform;"undefined"!==typeof i&&(this.opacity=i),this.transform=e,this.$nextTick((function(){t.timer=setTimeout((function(){t.animation=(0,r.createAnimation)(t.config,t),t.tranfromInit(!1).step(),t.animation.run(),t.$emit("change",{detail:t.isShow})}),20)}))},close:function(t){var n=this;this.animation&&this.tranfromInit(!0).step().run((function(){n.isShow=!1,n.animationData=null,n.animation=null;var t=n.styleInit(!1),i=t.opacity,e=t.transform;n.opacity=i||1,n.transform=e,n.$emit("change",{detail:n.isShow})}))},styleInit:function(t){var n=this,i={transform:""},e=function(t,e){"fade"===e?i.opacity=n.animationType(t)[e]:i.transform+=n.animationType(t)[e]+" "};return"string"===typeof this.modeClass?e(t,this.modeClass):this.modeClass.forEach((function(n){e(t,n)})),i},tranfromInit:function(t){var n=this,i=function(t,i){var e=null;"fade"===i?e=t?0:1:(e=t?"-100%":"0","zoom-in"===i&&(e=t?.8:1),"zoom-out"===i&&(e=t?1.2:1),"slide-right"===i&&(e=t?"100%":"0"),"slide-bottom"===i&&(e=t?"100%":"0")),n.animation[n.animationMode()[i]](e)};return"string"===typeof this.modeClass?i(t,this.modeClass):this.modeClass.forEach((function(n){i(t,n)})),this.animation},animationType:function(t){return{fade:t?1:0,"slide-top":"translateY(".concat(t?"0":"-100%",")"),"slide-right":"translateX(".concat(t?"0":"100%",")"),"slide-bottom":"translateY(".concat(t?"0":"100%",")"),"slide-left":"translateX(".concat(t?"0":"-100%",")"),"zoom-in":"scaleX(".concat(t?1:.8,") scaleY(").concat(t?1:.8,")"),"zoom-out":"scaleX(".concat(t?1:1.2,") scaleY(").concat(t?1:1.2,")")}},animationMode:function(){return{fade:"opacity","slide-top":"transl
|