现在想用Echarts制作一些图表显示数据,官方给的例子里面引入的是echarts.simple.min.js,但是效果没有那么好,然后我就换了js文件,从Echarts官网定制了另外一个js文件,然后同样的代码,就报错了,报错信息为
[system] errorHandler TypeError: t.addEventListener is not a function
at ve (echarts.min.js:1)
at ki.<anonymous> (echarts.min.js:2)
at Array.forEach (<anonymous>)
at f (echarts.min.js:1)
at e (echarts.min.js:2)
at new ki (echarts.min.js:2)
at new vg (echarts.min.js:6)
at Pi (echarts.min.js:2)
at new _l (echarts.min.js:3)
at Object.Vl (echarts.min.js:3) Vue {_uid: 1, _isVue: true, $options: {…}, _renderProxy: Proxy, _self: Vue, …}$attrs: (...)$children: []$createElement: ƒ (a, b, c, d)$listeners: (...)$options: {components: {…}, directives: {…}, filters: {…}, _base: ƒ}$parent: undefined$refs: {}$root: Vue {_uid: 1, _isVue: true, $options: {…}, _renderProxy: Proxy, _self: Vue, …}$scopedSlots: {}$slots: {}$vnode: undefined_c: ƒ (a, b, c, d)_data: {ob: Observer}_directInactive: false_events: {onError: Array(1), onPageNotFound: Array(1), onAppEnterBackground: Array(1), onAppEnterForeground: Array(1), onPullDownRefresh: Array(1), …}_hasHookEvent: false_inactive: null_isBeingDestroyed: false_isDestroyed: false_isMounted: false_isVue: true_renderProxy: Proxy {_uid: 1, _isVue: true, $options: {…}, _renderProxy: Proxy, _self: Vue, …}_self: Vue {_uid: 1, _isVue: true, $options: {…}, _renderProxy: Proxy, _self: Vue, …}_staticTrees: null_uid: 1_vnode: null_watcher: null_watchers: []$data: (...)$isServer: (...)$page: (...)$props: (...)$route: (...)$router: (...)$ssrContext: (...)get $attrs: ƒ reactiveGetter()set $attrs: ƒ reactiveSetter(newVal)get $listeners: ƒ reactiveGetter()set $listeners: ƒ reactiveSetter(newVal)proto: Object event handler for "view.onRequestComponentInfo"
提示是 t.addEventListener is not a function
有没有大神可以解决的,或者有思路的,多谢大家!
老司机开个车 (作者)
解决了这个问题,真的感谢,是不是H5显示出来只能是静态页?那我用npm的方式引入echarts,出现这个错:
el.addEventListener is not a function
2019-04-11 17:11
yiyixun
回复 老司机开个车:您好,我也是npm引入echarts,报el.addEventListener is not a function。请问解决了吗
2019-04-30 17:42
老司机开个车 (作者)
回复 yiyixun: 没解决,App端没影响,H5的话还是不要这样用,引入js吧
2019-05-07 16:50
yiyixun
回复 老司机开个车: 嗯嗯 好的
2019-05-07 16:53