Skip to content

Commit

Permalink
fix: 修复调用图表的dispose时报异常
Browse files Browse the repository at this point in the history
  • Loading branch information
whinc committed Jun 9, 2024
1 parent 82e6cdf commit cfd84b5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions ec-canvas/wx-canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ export default class WxCanvas {
// noop
}

removeEventListener() {
// noop
}

attachEvent() {
// noop
}
Expand Down
4 changes: 2 additions & 2 deletions pages/lazyLoad/index.wxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--index.wxml-->
<view class="container">
<button bindtap="init" wx:if="{{!isLoaded}}">加载图表</button>
<button bindtap="init" wx:if="{{!isLoaded || isDisposed}}">加载图表</button>
<button bindtap="dispose" wx:if="{{isLoaded && !isDisposed}}">释放图表</button>
<ec-canvas wx:if="{{!isDisposed}}" id="mychart-dom-bar" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
<ec-canvas id="mychart-dom-bar" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
4 changes: 2 additions & 2 deletions project.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"minifyWXML": true
},
"compileType": "miniprogram",
"libVersion": "2.10.2",
"appid": "wxee40007e9b62f5d0",
"libVersion": "3.4.7",
"appid": "wx1e8d61f702e9d442",
"projectname": "ECharts%20Demo",
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
Expand Down

0 comments on commit cfd84b5

Please sign in to comment.