企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[TOC] ## useElementVisibility 元素可见性,切换浏览器时可显示 ``` const target = ref(null) const targetIsVisible = useElementVisibility(target) ``` ## useIntersectionObserver 在当前页面中是否可见 ``` const target = ref(null) const targetIsVisible = ref(false) const { stop } = useIntersectionObserver( target, ([{ isIntersecting }], observerElement) => { targetIsVisible.value = isIntersecting }, ) ```