动态Theme 初版

This commit is contained in:
tangly1024
2022-03-03 20:30:48 +08:00
parent f061d8fc03
commit b005a3209e
4 changed files with 22 additions and 8 deletions

View File

@@ -1,9 +1,12 @@
import BLOG from '@/blog.config'
import { getPostBlocks } from '@/lib/notion'
import { getGlobalNotionData } from '@/lib/notion/getNotionData'
import { LayoutIndex, THEME_CONFIG } from '@/themes'
import { LayoutIndex, THEME_CONFIG, ThemeMap } from '@/themes'
import { useGlobal } from '@/lib/global'
const Index = (props) => {
const { theme } = useGlobal()
console.log('模板', ThemeMap[theme].LayoutIndex)
return <LayoutIndex {...props}/>
}