this.applyTable.tableData[1]._highlight = true//高亮某一行 util.isEmpty是一个工具类用来判断是否为空或者null的 此表格用的是iview ui 已.ivu开头的为iview表格,其它ui框架请自行更换即可 setTimeout(() => { util.isEmpty(document.querySelector('.testClass .ivu-table-tbody .ivu-table-row-highlight')) ? '': document.querySelector('.testClass .ivu-table-tbody .ivu-table-row-highlight').scrollIntoView({ behavior: "instant", block: "start", inline: "nearest" } ) }, 100) behavior:定义过渡动画。"auto","instant"或"smooth"。默认为"auto"。 block:"start","center","end"或"nearest"。默认为"center" inline "start","center","end"或"nearest"。默认为"nearest"