应用在冷启动时出现闪屏现象。
参数名
类型
必填
说明
value
boolean
是
是否同步加载图片,默认是异步加载。同步加载时阻塞UI线程,不会显示占位图。默认值:false,false表示异步加载图片,true表示同步加载图片。
"startWindowIcon": "$media:splash_icon", "startWindowBackground": "$color:transparent",
@Entry @Component struct SplashPage { build() { Column() { Image($r('app.media.splash_bg')) .width('100%') .height('100%') .syncLoad(true) // 同步加载避免闪屏 } } }