mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 07:28:37 +08:00
fix(build): wrap top-level await in async function for browser compatibility
This commit is contained in:
+8
-6
@@ -33,12 +33,14 @@ import { fetchGlobalSettings } from './api'
|
|||||||
// 创建Vue实例
|
// 创建Vue实例
|
||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
|
|
||||||
try {
|
async function initializeApp() {
|
||||||
const globalSettings = await fetchGlobalSettings()
|
try {
|
||||||
// 使用 provide 传递全局设置
|
const globalSettings = await fetchGlobalSettings()
|
||||||
app.provide('globalSettings', globalSettings)
|
// 使用 provide 传递全局设置
|
||||||
} catch (error) {
|
app.provide('globalSettings', globalSettings)
|
||||||
console.error('Failed to initialize app', error)
|
} catch (error) {
|
||||||
|
console.error('Failed to initialize app', error)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 注册全局组件
|
// 注册全局组件
|
||||||
|
|||||||
Reference in New Issue
Block a user