Ver código fonte

fix bug:搜索无法搜索分组、拖拽后右侧编辑器大小未自适应

BillDowney 4 anos atrás
pai
commit
ea2f53729e

+ 4 - 2
magic-editor/src/console/src/components/editor/magic-script-editor.vue

@@ -106,7 +106,9 @@ export default {
       folding: true,
       lineDecorationsWidth: 35,
       wordWrap: 'on',
-      theme: store.get('skin') || 'default'
+      theme: store.get('skin') || 'default',
+      // 自动调整大小
+      automaticLayout: true
     })
     this.editor.addAction({
       id: 'editor.action.triggerSuggest.extension',
@@ -347,7 +349,7 @@ export default {
           item.ext.loading = false;
         })
       }
-      this.layout()
+      // this.layout()
     },
     deleteWrapperProperties(obj){
       delete obj.ext

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

@@ -142,7 +142,7 @@ export default {
       let loopSearch = (row, parentName, parentPath) => {
         if (row.folder) {
           row.children.forEach(it => loopSearch(it, parentName + '/' + (row.name || ''), parentPath + '/' + (row.path || '')))
-          row._searchShow = row.children.some(it => it._searchShow)
+          row._searchShow = (row.name || '').toLowerCase().indexOf(keyword) > -1 || row.children.some(it => it._searchShow)
         } else {
           row._searchShow = replaceURL(parentName + '/' + (row.name || '')).toLowerCase().indexOf(keyword) > -1 || replaceURL(parentPath + '/' + (row.path || '')).toLowerCase().indexOf(keyword) > -1
         }

+ 1 - 1
magic-editor/src/console/src/components/resources/magic-function-list.vue

@@ -141,7 +141,7 @@ export default {
       let loopSearch = (row, parentName, parentPath) => {
         if (row.folder) {
           row.children.forEach(it => loopSearch(it, parentName + '/' + (row.name || ''), parentPath + '/' + (row.path || '')))
-          row._searchShow = row.children.some(it => it._searchShow)
+          row._searchShow = (row.name || '').toLowerCase().indexOf(keyword) > -1 || row.children.some(it => it._searchShow)
         } else {
           row._searchShow = replaceURL(parentName + '/' + (row.name || '')).toLowerCase().indexOf(keyword) > -1 || replaceURL(parentPath + '/' + (row.path || '')).toLowerCase().indexOf(keyword) > -1
         }