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