theme-proxio-init

This commit is contained in:
tangly1024
2025-04-12 11:20:38 +08:00
parent 61bdfef701
commit 951c4eaa08
56 changed files with 5005 additions and 0 deletions

36
components/Lenis.js Normal file
View File

@@ -0,0 +1,36 @@
/**
* 鼠标滚动阻尼感
*/
import { useEffect } from 'react'
// import anime from 'animejs'
import { siteConfig } from '@/lib/config'
import { loadExternalResource } from '@/lib/utils'
/**
* 鼠标点击烟花特效
* @returns
*/
const Lenis = () => {
useEffect(() => {
// 异步加载
async function loadLenis() {
loadExternalResource(
'https://unpkg.com/lenis@1.2.3/dist/lenis.mjs',
'js'
).then(() => {
console.log('Lenis',window.Lenis)
})
}
loadLenis()
return () => {
// 在组件卸载时清理资源
}
}, [])
return <></>
}
export default Lenis