修复bug

This commit is contained in:
WangXiaoDong
2024-06-27 22:23:28 +08:00
parent 67250edba6
commit cc7b636421
9 changed files with 249 additions and 261 deletions

View File

@@ -150,7 +150,6 @@ export default defineComponent({
this.gap_y = 0
this.poss = []
this.loading = false
this.computedHeight = 0
this.list = []
this.resize()
},

View File

@@ -575,19 +575,34 @@ export default defineComponent({
},
directives:{
commentUnfold:{
updated (el,binding) {
mounted (el,binding) {
let parent = el.parentNode
let commentBtn = parent.querySelector('.left_content_item_unfold')
let commentDomSon = el.querySelector('div')
let maxHeight = Number((window.getComputedStyle(el).maxHeight).split('px')[0])
console.log(commentDomSon.offsetHeight , maxHeight);
if(commentDomSon.offsetHeight > maxHeight){
commentBtn.style.display = 'block'
}else if(!binding.value.detailUnfold){
commentBtn.style.display = 'none'
}
},
// updated (el,binding) {
// let parent = el.parentNode
// let commentBtn = parent.querySelector('.left_content_item_unfold')
// let commentDomSon = el.querySelector('div')
// let maxHeight = Number((window.getComputedStyle(el).maxHeight).split('px')[0])
// console.log(commentDomSon.offsetHeight , maxHeight);
// if(commentDomSon.offsetHeight > maxHeight){
// commentBtn.style.display = 'block'
// }else if(!binding.value.detailUnfold){
// commentBtn.style.display = 'none'
// }
}
// }
},
mousewheel:{
mounted (el,binding:any) {