feat: 添加 useIntersectionObserverList 页面,支持懒加载和可见性检测

This commit is contained in:
严浩
2024-12-07 19:28:37 +08:00
parent b309260e8f
commit 12a02eb193
9 changed files with 368 additions and 301 deletions

View File

@@ -16,8 +16,8 @@
app.style.minHeight = `${window.innerHeight}px`;
}
window.addEventListener('resize', setAppHeight);
window.addEventListener('load', setAppHeight);
// window.addEventListener('resize', setAppHeight);
// window.addEventListener('load', setAppHeight);
</script>
<style type="text/css">
body {
@@ -43,7 +43,8 @@
</style>
</head>
<body ontouchstart ontouchend>
<!-- ontouchstart ontouchend -->
<body>
<div id="app">
<div class="page-wrapper" style="display: flex; justify-content: center; align-items: center">Loading...</div>
</div>