mirror of
https://github.com/hustcc/echarts-for-react.git
synced 2025-12-08 20:16:09 +00:00
chore: upgrade size-sensor version (#358)
This commit is contained in:
parent
f59d39fb53
commit
998b83251c
14
demo/dist/bundle.js
vendored
14
demo/dist/bundle.js
vendored
File diff suppressed because one or more lines are too long
10
lib/core.js
10
lib/core.js
@ -130,6 +130,11 @@ var EchartsReactCore = function (_Component) {
|
||||
}, {
|
||||
key: 'componentDidUpdate',
|
||||
value: function componentDidUpdate(prevProps) {
|
||||
// 判断是否需要 setOption,由开发者自己来确定。默认为 true
|
||||
if (typeof this.props.shouldSetOption === 'function' && !this.props.shouldSetOption(prevProps, this.props)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 以下属性修改的时候,需要 dispose 之后再新建
|
||||
// 1. 切换 theme 的时候
|
||||
// 2. 修改 opts 的时候
|
||||
@ -147,11 +152,6 @@ var EchartsReactCore = function (_Component) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 判断是否需要 setOption,由开发者自己来确定。默认为 true
|
||||
if (typeof this.props.shouldSetOption === 'function' && !this.props.shouldSetOption(prevProps, this.props)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var echartObj = this.renderEchartDom();
|
||||
// 样式修改的时候,可能会导致大小变化,所以触发一下 resize
|
||||
if (!(0, _fastDeepEqual2['default'])(prevProps.style, this.props.style) || !(0, _fastDeepEqual2['default'])(prevProps.className, this.props.className)) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "echarts-for-react",
|
||||
"version": "2.0.15-beta.1",
|
||||
"version": "2.0.16",
|
||||
"description": "baidu Echarts(v3.x & v4.x) components for react.",
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
@ -88,7 +88,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^2.0.1",
|
||||
"size-sensor": "^0.2.0"
|
||||
"size-sensor": "^1.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=0.13.2 || ^0.14 || ^15.0.0 || >=16.0.0",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user