소스 검색

Grid封面背景加空判断

onecold 1 년 전
부모
커밋
977ac6d444
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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 })