mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
内置AOS和TypedJS,避免CDN网络问题
This commit is contained in:
@@ -10,14 +10,8 @@ import { useEffect } from 'react'
|
||||
export default function AOSAnimation() {
|
||||
const initAOS = async () => {
|
||||
Promise.all([
|
||||
loadExternalResource(
|
||||
'https://cdn.bootcdn.net/ajax/libs/aos/2.3.4/aos.js',
|
||||
'js'
|
||||
),
|
||||
loadExternalResource(
|
||||
'https://cdn.bootcdn.net/ajax/libs/aos/2.3.4/aos.css',
|
||||
'css'
|
||||
)
|
||||
loadExternalResource('/js/aos.js', 'js'),
|
||||
loadExternalResource('/css/aos.css', 'css')
|
||||
]).then(() => {
|
||||
if (window.AOS) {
|
||||
window.AOS.init()
|
||||
|
||||
Reference in New Issue
Block a user