修复bug
This commit is contained in:
@@ -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