Pārlūkot izejas kodu

解决搜索框有时展示不出代码bug,解决左侧树复制接口时不能弹出编辑框bug

BillDowney 4 gadi atpakaļ
vecāks
revīzija
8a35447854

+ 1 - 1
magic-editor/src/console/src/components/layout/magic-search.vue

@@ -65,7 +65,7 @@ export default {
       this.showDialog = false
     },
     initEditor() {
-      if (!this.searchEditor) {
+      if (this.searchList.length > 0 && !this.searchEditor) {
         this.searchEditor = monaco.editor.create(document.getElementById('searchEditor'), {
           minimap: {
             enabled: false

+ 2 - 2
magic-editor/src/console/src/components/resources/magic-api-list.vue

@@ -401,8 +401,8 @@ export default {
                 return
               }
               let newItem = {
-                copy: true,
-                ...item
+                ...item,
+                copy: true
               }
               newItem.name = newItem.name + '(复制)'
               newItem.tmp_id = new Date().getTime() + '' + Math.floor(Math.random() * 1000)