ananzhusen vor 1 Jahr
Ursprung
Commit
4701829d46
1 geänderte Dateien mit 26 neuen und 17 gelöschten Zeilen
  1. 26 17
      src/views/components/Header.vue

+ 26 - 17
src/views/components/Header.vue

@@ -26,7 +26,7 @@
           <a @click="save()">保存</a>
         </t-dropdown-item>
         <t-dropdown-item>
-          <a @click="save(SaveType.SaveAs, '', undefined, 1)">另存</a>
+          <a @click="save(SaveType.SaveAs, '', undefined, 1)">另存</a>
         </t-dropdown-item>
         <t-dropdown-item divider="true">
           <a @click="downloadJson">下载JSON文件</a>
@@ -2281,25 +2281,32 @@ const downloadZipDialog = reactive({
 
 const prePay = async () => {
   let list = [];
+  let names = data.purchasedList.map((item) => item.name);
   if(data.payDiagram.checked){
       prePayList.pngs.forEach((item) => {
-        list.push({
-          type: '图片图元',
-          name: item,
-        });
+        if(!names.includes(item)){
+          list.push({
+            type: '图片图元',
+            name: item,
+          });
+        }
       });
       prePayList.jsPens.forEach((item) => {
-        list.push({
-          type: 'JS线性图元',
-          name: item,
-        });
+        if(!names.includes(item)){
+          list.push({
+            type: 'JS线性图元',
+            name: item,
+          });
+        }
       });
 
       prePayList.iotPens.forEach((item) => {
-        list.push({
-          type: '控件',
-          name: item,
-        });
+        if(!names.includes(item)){
+          list.push({
+            type: '控件',
+            name: item,
+          });
+        }
       });
       if ([...prePayList.svgPens].includes('*')) {
         list.push({
@@ -2307,10 +2314,12 @@ const prePay = async () => {
         });
       } else {
         prePayList.svgPens.forEach((item) => {
-          list.push({
-            type: 'SVG线性图元',
-            name: item,
-          });
+          if(!names.includes(item)){
+            list.push({
+              type: 'SVG线性图元',
+              name: item,
+            });
+          }
         });
       }
   }