Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
需要胜利内置按钮或胜利原生 API 来重置胜利缩放容器的缩放。
我遇到了同样的问题,最后做了一个componentDidUpdate检查是否prevprops.(state) !== this.props.(state)并将其设置zoomDomain为 null 的方法。
componentDidUpdate
prevprops.(state) !== this.props.(state)
zoomDomain
componentDidUpdate(prevProps) { if (prevProps.usState !== this.props.usState) { this.setState({ zoomDomain: null }) } }