fix: 修复 popOver 可能不显示的问题
Some checks failed
gh-pages / build (20.x) (push) Waiting to run
CodeQL / Analyze (javascript) (push) Has been cancelled

This commit is contained in:
2betop 2024-11-18 20:07:55 +08:00
parent 4e4f06cdea
commit 16a455c6f2

View File

@ -82,14 +82,14 @@ class Position extends React.Component<any, any> {
}
if (!target || !target.offsetWidth) {
return;
// return this.setState({
// ready: false,
// positionLeft: 0,
// positionTop: 0,
// arrowOffsetLeft: null,
// arrowOffsetTop: null
// });
// 靠这个 re-render 来重置 position
return this.setState({
ready: false,
positionLeft: 0,
positionTop: 0,
arrowOffsetLeft: null,
arrowOffsetTop: null
});
}
const watchTargetSizeChange = this.props.watchTargetSizeChange;