Browse Source

新增showActionSheetDialog支持深浅色模式切换

chendeben 1 year ago
parent
commit
18d2fa8761

+ 8 - 2
entry/src/main/ets/view/LocalMusic.ets

@@ -1177,11 +1177,17 @@ export struct LocalMusic {
     if (this.modeType === 2 || this.modeType === 3) {
       return
     }
-    //动作面板
     DialogHelper.showActionSheetDialog({
       title: "请选择添加方式(建议歌词文件一起导入)",
-      sheets: ["新建歌单", "手动导入", "自动导入"],
+      // sheets: ["新建歌单", "手动导入", "自动导入"],
+      sheets:[
+        { value: "新建歌单", fontColor:  $r('app.color.text_color') },
+        { value: "手动导入", fontColor:  $r('app.color.text_color') },
+        { value: "自动导入", fontColor:  $r('app.color.text_color') },
+
+      ],
       maskColor: Color.Transparent,
+      backgroundColor: $r('app.color.bg_card'),
       transition: AnimationHelper.transitionInDown(555),
       onAction: (index) => {
         switch (index) {

+ 4 - 0
entry/src/main/resources/base/element/color.json

@@ -126,6 +126,10 @@
     {
       "name": "title_bar_bg_text",
       "value": "#FF4081"
+    },
+    {
+      "name": "bg_card",
+      "value": "#ffffff"
     }
   ]
 }

+ 4 - 0
entry/src/main/resources/dark/element/color.json

@@ -143,6 +143,10 @@
     {
       "name": "title_bar_bg_text",
       "value": "#FF4081"
+    },
+    {
+      "name": "bg_card",
+      "value": "#1E1E1E"
     }
   ]
 }