浏览代码

跳转到变色行

gangyj 2 年之前
父节点
当前提交
b2ce96feb5
共有 1 个文件被更改,包括 11 次插入2 次删除
  1. 11 2
      src/views/exctab/ElementIdentification/index.vue

+ 11 - 2
src/views/exctab/ElementIdentification/index.vue

@@ -1204,8 +1204,17 @@ export default {
               break;
             }
           }
-
-          this.$refs.tablescroll.$el.scrollTop = 120+this.titleIndex*65;
+          
+          //this.$refs.tablescroll.$el.scrollTop = 120+this.titleIndex*65;
+          //console.log(this.$refs.tablescroll.$el.scrollTop)
+          this.$nextTick(()=>{
+            let row = document.querySelectorAll(".warning-row");
+            if(row.length){
+              this.$refs.tablescroll.$el.scrollTop = row[0].offsetTop;
+            }
+            //console.dir(row[0])
+          })
+          
         }
       }
     },