mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
主题切换
This commit is contained in:
@@ -106,6 +106,7 @@ const initTheme = () => {
|
||||
setTimeout(() => {
|
||||
const elements = document.querySelectorAll('[id^="theme-"]')
|
||||
if (elements?.length > 1) {
|
||||
elements[elements.length - 1].scrollIntoView()
|
||||
// 删除前面的元素,只保留最后一个元素
|
||||
elements[0].parentNode.removeChild(elements[0])
|
||||
elements.pop()
|
||||
@@ -113,4 +114,5 @@ const initTheme = () => {
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
|
||||
export const useGlobal = () => useContext(GlobalContext)
|
||||
|
||||
Reference in New Issue
Block a user