看板 点击切换主题

This commit is contained in:
tangly1024
2022-03-22 12:51:39 +08:00
parent 88d1f98116
commit 1a8e0fb505

View File

@@ -1,5 +1,6 @@
/* eslint-disable no-undef */
import BLOG from '@/blog.config'
import { useGlobal } from '@/lib/global'
import { loadExternalResource } from '@/lib/utils'
import { useEffect, useState } from 'react'
@@ -8,6 +9,7 @@ export default function Live2D () {
return <></>
}
const [init, setInit] = useState()
const { switchTheme } = useGlobal()
// if (typeof window !== 'undefined' && !hasLoad) {
// initLive2D()
@@ -21,7 +23,7 @@ export default function Live2D () {
}
}, [init])
return <canvas id="live2d" className='animate__slideInUp animate__animated' width="280" height="250"/>
return <canvas id="live2d" className='animate__slideInUp animate__animated cursor-pointer' width="280" height="250" onClick={switchTheme} alt='切换主题' title='切换主题'/>
}
function initLive2D () {