fix: tour animated

pull/6588/head
tangjinzhou 2023-05-18 07:23:46 +08:00
parent 83017269ab
commit c36f7e701f
1 changed files with 4 additions and 0 deletions

View File

@ -43,6 +43,10 @@ export default function useTarget(
const [posInfo, setPosInfo] = useState<PosInfo>(null);
const updatePos = () => {
if (!open.value) {
setPosInfo(null);
return;
}
if (targetElement.value) {
// Exist target element. We should scroll and get target position
if (!isInViewPort(targetElement.value) && open.value) {