chore: upgrade size-sensor version (#358)

This commit is contained in:
hustcc 2020-05-19 19:46:04 +08:00 committed by GitHub
parent f59d39fb53
commit 998b83251c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 11 deletions

1
.npmrc
View File

@ -1 +0,0 @@
registry=https://registry.npmjs.org

14
demo/dist/bundle.js vendored

File diff suppressed because one or more lines are too long

View File

@ -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)) {

View File

@ -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",