Browse Source

fix: 修复上方工具条,复制粘贴不能使用的问题

yunxing 3 years ago
parent
commit
d9c932234a
1 changed files with 7 additions and 2 deletions
  1. 7 2
      src/lib/SPlanScene.ts

+ 7 - 2
src/lib/SPlanScene.ts

@@ -587,7 +587,12 @@ export class SPlanScene extends SBaseEditScene {
         return itemList;
     }
     copy(): void {
-        const itemList = this.save(false);
+        const cpItemList = this.save(false);
+
+        const itemList = {
+            markers:  cpItemList?.elements.markers,
+            relations: cpItemList?.elements.relations,
+        }
         if (itemList) {
             // 删除对应得id
             itemList.markers.map((item: any) => {
@@ -619,7 +624,7 @@ export class SPlanScene extends SBaseEditScene {
             input.select();
             document.execCommand("copy");
             input.style.display = "none";
-            console.log(input.value, Date.now());
+            // console.log(input.value, Date.now());
             document.body.removeChild(input);
         }
     }