首次提交:初始化项目代码

This commit is contained in:
sunct
2026-07-31 14:42:05 +08:00
commit ecca407485
84 changed files with 24158 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
import { createSSRApp } from 'vue'
import App from './App.vue'
// 1. 引入主题核心方法
import {
THEME_PRESETS,
switchTheme,
getThemeConfigFromStorage,
initTheme
} from './utils/theme.js'
// 2. 导入主题混入文件
import themeMixin from './mixins/themeMixin.js'
export function createApp() {
const app = createSSRApp(App)
// 注册全局混入
app.mixin(themeMixin)
// 挂载的全局主题方法
app.config.globalProperties.$theme = {
presets: THEME_PRESETS,
switchTheme: switchTheme,
getConfig: getThemeConfigFromStorage,
initTheme: initTheme
}
return { app }
}