Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

溢出判断有问题 #31

Open
Han3Jim opened this issue Mar 17, 2020 · 0 comments
Open

溢出判断有问题 #31

Han3Jim opened this issue Mar 17, 2020 · 0 comments

Comments

@Han3Jim
Copy link

Han3Jim commented Mar 17, 2020

if (parseInt(fullHeight) > parseInt(limitedHeight)) {
this.setState({ shouldShowReadMore: true }, () => {
this.props.onReady && this.props.onReady();
});
} else {
this.props.onReady && this.props.onReady();
}
需要加parseInt,小数点后面太多容易出现误差。

WeChat4cc72858bc2ab0cc4217b42198b86d41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant