feat: 添加新手引导功能和侧边栏折叠功能
This commit is contained in:
+17
-1
@@ -10,6 +10,8 @@ import router from "@/router/router"
|
||||
// 引入国际化
|
||||
import i18n from "@/i18n"
|
||||
import { detectPlatform } from "@/composables/usePlatform"
|
||||
import { nextTick } from "vue"
|
||||
import { useOnboardingStore } from "@/stores/onboarding"
|
||||
|
||||
/*
|
||||
* macOS 的无边框窗口系统不会自动裁圆角,需要配合 transparent 窗口,
|
||||
@@ -25,4 +27,18 @@ app.use(createPinia())
|
||||
app.use(Antd)
|
||||
app.use(i18n)
|
||||
app.use(router)
|
||||
app.mount("#app")
|
||||
// 路由懒加载完成后再挂载,避免启动画面移除后出现空白内容区。
|
||||
async function mountApp() {
|
||||
await router.isReady()
|
||||
app.mount("#app")
|
||||
await nextTick()
|
||||
// 让浏览器先绘制完整布局,再揭开启动画面并开始首次引导。
|
||||
requestAnimationFrame(() => {
|
||||
requestAnimationFrame(() => {
|
||||
document.getElementById("startup-loader")?.remove()
|
||||
useOnboardingStore().ready = true
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
void mountApp()
|
||||
|
||||
Reference in New Issue
Block a user