Pārlūkot izejas kodu

左边侧边栏圆角处理

onecold 1 gadu atpakaļ
vecāks
revīzija
627992b4ca

+ 15 - 11
entry/src/main/ets/pages/NewIndex.ets

@@ -261,24 +261,30 @@ struct NewIndex{
               .width('100%')
               .width('100%')
               .visibility(this.isCoverOpacity()?Visibility.None:Visibility.Visible)
               .visibility(this.isCoverOpacity()?Visibility.None:Visibility.Visible)
               .height(180)
               .height(180)
-            Blank()
-              .backgroundColor(this.themeColor)
-              .visibility(this.isCoverOpacity()?Visibility.Visible:Visibility.None)
-              .width('100%')
-              .height(55)
+              .borderRadius({
+                topLeft: 0,
+                topRight	: 20,
+                bottomLeft: 0,
+                bottomRight: 0
+              })
             // 动态生成抽屉菜单内容
             // 动态生成抽屉菜单内容
             this.getDrawerView()
             this.getDrawerView()
           }
           }
-          .width(this.currentBreakpoint !== BreakpointTypeEnum.SM?'40%':'75%')
+          .width('100%')
           .height('100%')
           .height('100%')
-          .backgroundColor($r('app.color.silvery'))
           .onClick((event:ClickEvent)=>{
           .onClick((event:ClickEvent)=>{
             // 阻止事件冒泡
             // 阻止事件冒泡
           })
           })
         }
         }
-        .width('100%')
+        .width(this.currentBreakpoint !== BreakpointTypeEnum.SM?'36%':'70%')
         .height('100%')
         .height('100%')
-        .backgroundColor($r('app.color.ban_touming'))
+        .borderRadius({
+          topLeft: 0,
+          topRight	: 20,
+          bottomLeft: 0,
+          bottomRight: 20
+        })
+        .backgroundColor($r('app.color.silvery'))
         .alignItems(HorizontalAlign.Start)
         .alignItems(HorizontalAlign.Start)
         .onClick((event:ClickEvent)=>{
         .onClick((event:ClickEvent)=>{
           // 点击抽屉外部关闭抽屉
           // 点击抽屉外部关闭抽屉
@@ -489,9 +495,7 @@ struct NewIndex{
     }
     }
     .width('100%')
     .width('100%')
     .alignListItem(ListItemAlign.Center)
     .alignListItem(ListItemAlign.Center)
-    .backgroundColor($r('app.color.silvery'))
     .layoutWeight(1)
     .layoutWeight(1)
-    // .divider({ strokeWidth: 1, color: this.isDarkMode? '333333':'#ffe9f0f0' })
     .edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果
     .edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果
   }
   }
 
 

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

@@ -3076,7 +3076,7 @@ export struct LocalMusic {
     .cachedCount(3)
     .cachedCount(3)
     // .columnsTemplate('1fr '.repeat(this.currentWidthBreakpoint === WidthBreakpoint.WIDTH_SM ? 2 : 5))
     // .columnsTemplate('1fr '.repeat(this.currentWidthBreakpoint === WidthBreakpoint.WIDTH_SM ? 2 : 5))
     .columnsTemplate(this.twoFingerType==3?'repeat(auto-fit, 150)':this.twoFingerType==2?'repeat(auto-fit, 110)':'repeat(auto-fit, 80)')
     .columnsTemplate(this.twoFingerType==3?'repeat(auto-fit, 150)':this.twoFingerType==2?'repeat(auto-fit, 110)':'repeat(auto-fit, 80)')
-    .rowsGap(this.twoFingerType==3?18:this.twoFingerType==2?12:3)
+    .rowsGap(this.twoFingerType==3?10:this.twoFingerType==2?5:1)
     .visibility(this.isGridMusic?Visibility.Visible:Visibility.None)
     .visibility(this.isGridMusic?Visibility.Visible:Visibility.None)
     .scale({x:this.scaleValue,y:this.scaleValue,z:1})
     .scale({x:this.scaleValue,y:this.scaleValue,z:1})
     .gesture(PinchGesture({ fingers: 2 })
     .gesture(PinchGesture({ fingers: 2 })