uEchart.js 2.6 KB

12345678910
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/device/uEchart"],{"0f82":function(t,e,i){"use strict";i.r(e);var n=i("c01a"),c=i("3b82");for(var o in c)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return c[t]}))}(o);i("152c");var a=i("828b"),r=Object(a["a"])(c["default"],n["b"],n["c"],!1,null,"346669e4",null,!1,n["a"],void 0);e["default"]=r.exports},"152c":function(t,e,i){"use strict";var n=i("7590"),c=i.n(n);c.a},"3b82":function(t,e,i){"use strict";i.r(e);var n=i("6ee7"),c=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=c.a},"6ee7":function(t,e,i){"use strict";(function(t){var n=i("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var c=n(i("9dcc")),o={},a={data:function(){return{cWidth:"",cHeight:"",pixelRatio:"",cid:"",scrollTop:0}},created:function(){this.cid=this._uid},mounted:function(){var e=this;t.$on("onPageScroll",(function(t){e.scrollTop=Number(t)}))},methods:{initCharts:function(e){var i=this,n=t.createSelectorQuery().in(this);n.select("#mybox"+this._uid).boundingClientRect((function(n){i.cWidth=n.width,i.cHeight=n.height,i.pixelRatio=t.getSystemInfoSync().pixelRatio,i.drawCharts("uEchart"+i._uid,e)})).exec()},drawCharts:function(e,i){var n=this,a=t.createSelectorQuery().in(this);a.select("#"+e).fields({node:!0,size:!0}).exec((function(t){if(t[0]){var a=t[0].node,r=a.getContext("2d");a.width=t[0].width*n.pixelRatio,a.height=t[0].height*n.pixelRatio;var u={context:r,width:n.cWidth*n.pixelRatio,height:n.cHeight*n.pixelRatio,pixelRatio:n.pixelRatio},l=Object.assign(u,i);o[e]=new c.default(l)}else console.error("[uCharts]: 未获取到 context")}))},tap:function(e){var i=this,n=t.createSelectorQuery().in(this);n.select("#mybox"+this._uid).boundingClientRect((function(t){var n=t,c={};c=e.detail.x?{x:e.detail.x-n.left,y:e.detail.y-n.top-i.scrollTop}:{x:e.clientX-n.left,y:e.clientY-n.top-i.scrollTop},e.changedTouches=[],e.changedTouches.unshift(c),o[e.target.id].showToolTip(e)})).exec()}}};e.default=a}).call(this,i("df3c")["default"])},7590:function(t,e,i){},c01a:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return c})),i.d(e,"a",(function(){}));var n=function(){var t=this.$createElement;this._self._c},c=[]}}]);
  2. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  3. 'components/device/uEchart-create-component',
  4. {
  5. 'components/device/uEchart-create-component':(function(module, exports, __webpack_require__){
  6. __webpack_require__('df3c')['createComponent'](__webpack_require__("0f82"))
  7. })
  8. },
  9. [['components/device/uEchart-create-component']]
  10. ]);