树控件自动定位到默认选中的位置bug

master
e 3 years ago
parent 175e1c9b12
commit ca6d83c85a
  1. 1
      src/components/myTree/src/tree.vue
  2. 12
      src/views/Transaction.vue

@ -486,7 +486,6 @@
},
mounted() {
console.log(this.data)
this.initTabIndex();
this.$el.addEventListener('keydown', this.handleKeydown);
},

@ -479,18 +479,14 @@ export default {
});
},
handleCheckChange(data, checked, indeterminate, row, index) { //
console.log('=================')
let divTree = '#divTree'+index;
let dom = document.querySelector(divTree)
let depTree = '#depTree'+index;
let dom1 = document.querySelector(depTree)
let nodeHight =20
let nodeHight =26
dom1.style.height = (data.number * nodeHight) + "px"
let contHeight=(data.number * nodeHight)//,
console.log(contHeight)
dom.scrollTo(0, contHeight)
console.log(data)
console.log('=================')
this.checkChange = true
if (checked && data.isNode === 1) {
this.tableData[index].operationIds = data.id; // id
@ -808,7 +804,11 @@ export default {
}
};
</script>
<style>
.el-tree-node__content {
height: 26Px!important;
}
</style>
<style lang="scss" scoped>
.content {
position: relative;

Loading…
Cancel
Save