mxd %!s(int64=3) %!d(string=hai) anos
pai
achega
4cf2149b0b

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

@@ -129,7 +129,6 @@ export default {
       // 数据排序规则,true:升序,false:降序
       treeSort: true,
       groupChooseVisible: false,
-      recentlyOpenedVisible: false,
       srcId: '',
       // 新建分组对象
       createGroupObj: {
@@ -175,10 +174,6 @@ export default {
       bus.$emit('open', item)
       this.currentFileItem = item
     },
-    recentlyOpened(item){
-      this.open(item)
-      this.recentlyOpenedVisible = false
-    },
     // 初始化数据
     initData() {
       bus.$emit('status', '正在初始化接口列表')
@@ -861,8 +856,7 @@ export default {
     position(id){
       this.$nextTick(()=> {
         this.rebuildTree(false)
-        this.listChildrenData.forEach(item => item.selectRightItem = item.id === id || item.tmp_id === id)
-        goToAnchor('.ma-tree-select')
+        this.openItemById(id)
       })
     },
     // 根据id打开对应item
@@ -879,6 +873,7 @@ export default {
           if (cache) {
             this.$nextTick(() => {
               this.open(cache)
+              this.$nextTick(() => goToAnchor('.ma-tree-select'))
             })
           }
         })

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

@@ -809,8 +809,7 @@ export default {
     position(id){
       this.$nextTick(()=> {
         this.rebuildTree(false)
-        this.listChildrenData.forEach(item => item.selectRightItem = item.id === id || item.tmp_id === id)
-        goToAnchor('.ma-tree-select')
+        this.openItemById(id)
       })
     },
     // 根据id打开对应item
@@ -827,6 +826,7 @@ export default {
           if (cache) {
             this.$nextTick(() => {
               this.open(cache)
+              this.$nextTick(() => goToAnchor('.ma-tree-select'))
             })
           }
         })