Skip to content

Commit b982b5a

Browse files
committed
优化内存泄漏
1 parent ebe93a1 commit b982b5a

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 1.0.4-alpha (2019-10-24)
2+
3+
### Bug 修复
4+
5+
- **ActiveRingChart:** 优化内存泄漏.
6+
17
# 1.0.2-alpha (2019-09-27)
28

39
### Bug 修复

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@jiaminghi/data-view-react",
3-
"version": "1.0.2",
3+
"version": "1.0.4",
44
"description": "React Large screen data display component library",
55
"author": "Duan Yu <949267840@qq.com>",
66
"license": "MIT",
@@ -17,9 +17,7 @@
1717
"test:watch": "react-scripts test --env=jsdom",
1818
"build": "rollup -c",
1919
"start": "rollup -c -w",
20-
"prepare": "yarn run build",
21-
"predeploy": "cd example && yarn install && yarn run build",
22-
"deploy": "gh-pages -d example/build"
20+
"prepare": "yarn run build"
2321
},
2422
"dependencies": {
2523
"@jiaminghi/charts": "*"
@@ -46,7 +44,6 @@
4644
"eslint-plugin-promise": "^4.0.0",
4745
"eslint-plugin-react": "^7.10.0",
4846
"eslint-plugin-standard": "^3.1.0",
49-
"gh-pages": "^1.2.0",
5047
"less": "^3.10.3",
5148
"prop-types": "^15.7.2",
5249
"react": "^16.8.6",

src/components/activeRingChart/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ const ActiveRingChart = ({ config = {}, className, style }) => {
186186

187187
const mergedConfig = deepMerge(deepClone(defaultConfig, true), config || {})
188188

189-
chartRef.current.setOption(getRingOption(mergedConfig))
189+
chartRef.current.setOption(getRingOption(mergedConfig), true)
190190

191191
let activeIndex = 0
192192

@@ -196,7 +196,7 @@ const ActiveRingChart = ({ config = {}, className, style }) => {
196196

197197
const option = getOption(mergedConfig, activeIndex)
198198

199-
chartRef.current.setOption(option)
199+
chartRef.current.setOption(option, true)
200200

201201
const { activeTimeGap, data } = option.series[0]
202202

0 commit comments

Comments
 (0)