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 7d3073f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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>

0 comments on commit 7d3073f

Please sign in to comment.