Skip to content

Commit

Permalink
优化内存泄漏
Browse files Browse the repository at this point in the history
  • Loading branch information
yizhiyuyou committed Oct 24, 2019
1 parent b982b5a commit 526e936
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# 1.0.5-alpha (2019-10-24)

### Perfect

- **Charts:** 优化内存泄漏.
- **DigitalFlop:** 优化内存泄漏.

# 1.0.2-alpha (2019-09-27)

# 1.0.4-alpha (2019-10-24)

### Bug 修复
Expand All @@ -24,7 +33,7 @@

### Bug 修复

- **activeRingChart:** 由于数据值为 0 而导致计算异常.
- **ActiveRingChart:** 由于数据值为 0 而导致计算异常.

# 1.0.0-alpha (2019-09-23)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jiaminghi/data-view-react",
"version": "1.0.4",
"version": "1.0.5",
"description": "React Large screen data display component library",
"author": "Duan Yu <[email protected]>",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/components/charts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Charts = ({ option = {}, className, style }) => {
chartInstanceofRef.current ||
(chartInstanceofRef.current = new Chart(chartRef.current))

chartInstanceofRef.current.setOption(option || {})
chartInstanceofRef.current.setOption(option || {}, true)
}, [option])

useEffect(() => {
Expand Down
2 changes: 2 additions & 0 deletions src/components/digitalFlop/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ const DigitalFlop = ({ config = {}, className, style }) => {

Object.assign(graph, { animationCurve, animationFrame })

graph.animationEnd()

graph.animation('style', getStyle(mergedConfig), true)
graph.animation('shape', shape)
}, [config])
Expand Down

0 comments on commit 526e936

Please sign in to comment.