我使用了react insta story软件包。
play()
工作正常,但是 stories(node) {
this.refVal = node;
}
updateStoryStatus(type) {
const { storyStatus, change } = this.props;
let status = !type ? false : true;
if (!type) {
this.refVal.pause();
} else {
this.refVal.play();
}
}
<div>
<Stories ref={this.stories}
stories={photos}
defaultInterval={15000}
width={432}
height={548} loop={true}
/>
{
!status && <div onClick={() => updateStoryStatus(true)}>
<FontAwesome.FaPlay />
</div>
}
{
status && <div onClick={() => updateStoryStatus(false)}>
<FontAwesome.FaPause />
</div>
}
</div>
不工作。请帮我解决这个问题。
我的代码:
handleScroll