新增首页骨架屏并优化页面体验
This commit is contained in:
@@ -15,6 +15,17 @@ app.$mount()
|
||||
import { createSSRApp } from 'vue'
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
// 全局混入:所有页面加载时自动隐藏 loading
|
||||
app.mixin({
|
||||
onLoad() {
|
||||
// 页面加载完成,隐藏 loading
|
||||
uni.hideLoading()
|
||||
},
|
||||
|
||||
async onReady() {
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
return {
|
||||
app
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user