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
2.6 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/drag-button/drag-button"],{"0e3f":function(t,i,e){"use strict";(function(t){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var e={name:"drag-button",props:{isDock:{type:Boolean,default:!1},existTabBar:{type:Boolean,default:!1}},data:function(){return{top:0,left:0,width:0,height:0,offsetWidth:0,offsetHeight:0,windowWidth:0,windowHeight:0,isMove:!0,edge:10,text:"客服"}},mounted:function(){var i=this,e=t.getSystemInfoSync();this.windowWidth=e.windowWidth,this.windowHeight=e.windowHeight,e.windowTop&&(this.windowHeight+=e.windowTop),console.log(e);var n=t.createSelectorQuery().in(this);n.select("#_drag_button").boundingClientRect((function(t){i.width=t.width,i.height=t.height,i.offsetWidth=t.width/2,i.offsetHeight=t.height/2,i.left=i.windowWidth-i.width-i.edge,i.top=i.windowHeight-i.height-i.edge})).exec()},methods:{click:function(){this.$emit("btnClick")},touchstart:function(t){this.$emit("btnTouchstart")},touchmove:function(t){if(1!==t.touches.length)return!1;this.isMove=!0,this.left=t.touches[0].clientX-this.offsetWidth;var i=t.touches[0].clientY-this.offsetHeight,e=this.windowHeight-this.height-this.edge;i<this.edge?this.top=this.edge:this.top=i>e?e:i},touchend:function(t){if(this.isDock){var i=this.windowWidth-this.width-this.edge;this.left<this.windowWidth/2-this.offsetWidth?this.left=this.edge:this.left=i}this.isMove=!1,this.$emit("btnTouchend")}}};i.default=e}).call(this,e("543d")["default"])},"75f4":function(t,i,e){"use strict";e.r(i);var n=e("c997"),o=e("bc83");for(var h in o)"default"!==h&&function(t){e.d(i,t,(function(){return o[t]}))}(h);e("d627");var s,d=e("f0c5"),f=Object(d["a"])(o["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],s);i["default"]=f.exports},a47f:function(t,i,e){},bc83:function(t,i,e){"use strict";e.r(i);var n=e("0e3f"),o=e.n(n);for(var h in n)"default"!==h&&function(t){e.d(i,t,(function(){return n[t]}))}(h);i["default"]=o.a},c997:function(t,i,e){"use strict";var n;e.d(i,"b",(function(){return o})),e.d(i,"c",(function(){return h})),e.d(i,"a",(function(){return n}));var o=function(){var t=this,i=t.$createElement;t._self._c},h=[]},d627:function(t,i,e){"use strict";var n=e("a47f"),o=e.n(n);o.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/drag-button/drag-button-create-component',
{
'components/drag-button/drag-button-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("75f4"))
})
},
[['components/drag-button/drag-button-create-component']]
]);