mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-08 17:26:41 +08:00
Merge pull request #174 from InfinityPacer/dev
This commit is contained in:
@@ -33,6 +33,7 @@ import { fetchGlobalSettings } from './api'
|
||||
// 创建Vue实例
|
||||
const app = createApp(App)
|
||||
|
||||
async function initializeApp() {
|
||||
try {
|
||||
const globalSettings = await fetchGlobalSettings()
|
||||
// 使用 provide 传递全局设置
|
||||
@@ -40,8 +41,10 @@ try {
|
||||
} catch (error) {
|
||||
console.error('Failed to initialize app', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 注册全局组件
|
||||
initializeApp().then(() => {
|
||||
app
|
||||
.component('VAceEditor', VAceEditor)
|
||||
.component('VApexChart', VueApexCharts)
|
||||
@@ -88,3 +91,4 @@ app
|
||||
.use(VueApexCharts)
|
||||
.mount('#app')
|
||||
.$nextTick(() => removeEl('#loading-bg'))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user