Skip to content

溢出判断有问题 #31

@Han3Jim

Description

@Han3Jim

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

WeChat4cc72858bc2ab0cc4217b42198b86d41

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions