Ver Fonte

长按菜单增加多选按钮

onecold há 1 ano atrás
pai
commit
fd4b8eaab7

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

@@ -3957,7 +3957,14 @@ export struct LocalMusic {
                 }
 
               })
-
+            MenuItem({
+              symbolStartIcon: new SymbolGlyphModifier($r('sys.symbol.checkmark_square_on_square')),
+              content: $r('app.string.select_all')
+            })
+              .onClick(() => {
+                this.isMultiSelect =  !this.isMultiSelect
+                this.longItemFilePath = ''
+              })
             MenuItem({
               symbolStartIcon: new SymbolGlyphModifier($r('sys.symbol.rename')),
               content: $r('app.string.rename')

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

@@ -459,6 +459,10 @@
     {
       "name": "lossless",
       "value": "Lossless"
+    },
+    {
+      "name": "select_all",
+      "value": "多选"
     }
   ]
 }