Browse Source

Grid封面背景加空判断

onecold 1 year ago
parent
commit
977ac6d444
1 changed files with 1 additions and 1 deletions
  1. 1 1
      entry/src/main/ets/view/LocalMusic.ets

+ 1 - 1
entry/src/main/ets/view/LocalMusic.ets

@@ -3808,7 +3808,7 @@ export struct LocalMusic {
         }
         .width(this.getGridWight())
         .borderRadius(12)
-        .backgroundImage(item.pixelMapPath)
+        .backgroundImage(StrUtil.isEmpty(item.pixelMapPath)?$r('app.media.avatar'):item.pixelMapPath)
         .backgroundImageSize({ height: '100%', width: '100%' })
         .backgroundBlurStyle(BlurStyle.BACKGROUND_ULTRA_THICK)
         .animation({ curve: Curve.Sharp, duration: 300 })