修复bug
This commit is contained in:
@@ -150,7 +150,6 @@ export default defineComponent({
|
||||
this.gap_y = 0
|
||||
this.poss = []
|
||||
this.loading = false
|
||||
this.computedHeight = 0
|
||||
this.list = []
|
||||
this.resize()
|
||||
},
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user