效果图

在el-tree 控件加**:render-content="renderContent"**

在掉接口的方法中

实际有用的是setTimeout 方法和this.$refs.xxxxxx.setCheckedKeys([industrycodeList])
if(res.data.swindustrylist.length>0){
res.data.swindustrylist.forEach(item => {
industrycodeList.push(item.industrycode)
setTimeout(() => {
const currentDom = document.querySelector('#A' + item.industrycode)
console.log('industrycodeList',industrycodeList)
console.log('item.industrycode',item.industrycode)
if (currentDom) {
currentDom.scrollIntoView()
}
}, 1000)
})
this.$refs.mappTree.setCheckedKeys([industrycodeList])
}