Kaynağa Gözat

feat:图元/素材展开

ananzhusen 1 yıl önce
ebeveyn
işleme
9590e06f52
1 değiştirilmiş dosya ile 6 ekleme ve 2 silme
  1. 6 2
      src/views/components/Graphics.vue

+ 6 - 2
src/views/components/Graphics.vue

@@ -717,8 +717,12 @@ const groupChange = async (name: string) => {
   }
   // if (!activedPanels[name]) {
   activedPanels[name] = [];
-  for (const item of subGroups.value) {
-    activedPanels[name].push(item.name);
+  if(['素材','图元'].includes(name)){
+    activedPanels[name].push(subGroups.value[0].name);
+  }else{
+    for (const item of subGroups.value) {
+      activedPanels[name].push(item.name);
+    }
   }
   // }