소스 검색

feat:图形库管理

ananzhusen 1 년 전
부모
커밋
db62c7d9d7
1개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  1. 15 0
      src/views/components/Graphics.vue

+ 15 - 0
src/views/components/Graphics.vue

@@ -2068,14 +2068,29 @@ const updateAfterSave = (e) => {
 
 const onManageGraphic = () => {
   if (activedGroup.value === '素材') {
+    materials.forEach((item) => {
+      item.list.forEach((_item) => {
+        if(_item.visible === undefined){
+          _item.visible = true;
+        }
+      });
+    });
     manageDialog.data = deepClone(materials);
   } else if (activedGroup.value === '图元') {
+    pngs.forEach((item) => {
+      item.list.forEach((_item) => {
+        if(_item.visible === undefined){
+          _item.visible = true;
+        }
+      });
+    });
     manageDialog.data = deepClone(pngs);
   }
   manageDialog.show = true;
 };
 
 const manageConfirm = () => {
+  console.log('manageDialog.data',manageDialog.data)
   //TODO 后续存放到后端 目前本地存储
   if (activedGroup.value === '素材') {
     localforage.setItem('le5leV-materials', JSON.stringify(manageDialog.data));