You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

10 lines
3.8 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/hx-jump-ball/hx-jump-ball"],{"06e5":function(t,e,a){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={name:"hx-jump-ball",data:function(){return{flag:!1,ballBoxAnimation:null,ballOuterAnimation:null,ballBoxAnimationData:{},ballOuterAnimationData:{}}},props:{ballWidth:{type:Number,default:15},ballHeight:{type:Number,default:15},backgroundColor:{type:String,default:"reg"},backgroundImage:{type:String,default:""},index:{type:Number,default:0},start:{type:Number,default:1},element:{type:Array,default:function(){return[]}},speed:{type:Number,default:800},bezier:{type:String,default:"cubic-bezier(.6,-0.63,.94,.71)"}},watch:{start:function(t,e){var a=this;a.element&&(this.flag||(a.flag=!a.flag,a.getElementCoordinate(a.element[0],a.element[1])))}},created:function(){this.ballBoxAnimation=t.createAnimation({duration:0,timingFunction:this.bezier,delay:0}),this.ballOuterAnimation=t.createAnimation({duration:0,timingFunction:"linear",delay:0}),this.setEnd()},methods:{getElementCoordinate:function(e,a){var i=this,n=t.createSelectorQuery(),l=n.select(e);l.fields({id:!0,rect:!0,size:!0},(function(e){if(!e)return i.flag=!i.flag,void i.$emit("msg",{code:100,error:"未获取到起始元素位置"});var n=e.left+((e.width+i.ballWidth)/2-i.ballWidth),l=e.bottom-((e.height-i.ballHeight)/2+i.ballHeight),o=t.createSelectorQuery().select(a);o.fields({id:!0,rect:!0,size:!0},(function(t){if(t){var e=t.left+((t.width+i.ballWidth)/2-i.ballWidth),a=t.bottom-((t.height-i.ballHeight)/2+i.ballHeight);i.setStart(n,l,e,a),i.startAnimation(n,l,e,a)}else i.$emit("msg",{code:101,error:"未获取到结束元素位置"})})).exec()})).exec()},startAnimation:function(t,e,a,i){var n=this;setTimeout((function(){n.setEnd(),n.flag=!n.flag,n.$emit("msg",{code:0,status:!0})}),100+n.speed),setTimeout((function(){n.ballBoxAnimation.opacity(1).translate3d(a,i,0).step({duration:n.speed}),n.ballBoxAnimationData=n.ballBoxAnimation.export(),n.ballOuterAnimation.opacity(1).translate3d(0,0,0).step({duration:n.speed}),n.ballOuterAnimationData=n.ballOuterAnimation.export()}),50)},setStart:function(t,e,a,i){this.ballBoxAnimation.translate3d(a,e,0).opacity(1).step({duration:0}),this.ballBoxAnimationData=this.ballBoxAnimation.export(),this.ballOuterAnimation.translate3d(t-a,0,0).opacity(1).step({duration:0}),this.ballOuterAnimationData=this.ballOuterAnimation.export()},setEnd:function(){this.ballBoxAnimation.opacity(0).step({duration:0}),this.ballBoxAnimationData=this.ballBoxAnimation.export(),this.ballOuterAnimation.opacity(0).step({duration:0}),this.ballOuterAnimationData=this.ballOuterAnimation.export()}}};e.default=a}).call(this,a("543d")["default"])},1128:function(t,e,a){},"40b8":function(t,e,a){"use strict";a.r(e);var i=a("cb45"),n=a("da3e");for(var l in n)"default"!==l&&function(t){a.d(e,t,(function(){return n[t]}))}(l);a("d970");var o,r=a("f0c5"),u=Object(r["a"])(n["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],o);e["default"]=u.exports},cb45:function(t,e,a){"use strict";var i;a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return l})),a.d(e,"a",(function(){return i}));var n=function(){var t=this,e=t.$createElement;t._self._c},l=[]},d970:function(t,e,a){"use strict";var i=a("1128"),n=a.n(i);n.a},da3e:function(t,e,a){"use strict";a.r(e);var i=a("06e5"),n=a.n(i);for(var l in i)"default"!==l&&function(t){a.d(e,t,(function(){return i[t]}))}(l);e["default"]=n.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/hx-jump-ball/hx-jump-ball-create-component',
{
'components/hx-jump-ball/hx-jump-ball-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("40b8"))
})
},
[['components/hx-jump-ball/hx-jump-ball-create-component']]
]);