mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
perf: 优化数据流推送消息页面滚动
This commit is contained in:
parent
459bce93c1
commit
29ef080399
@ -505,7 +505,7 @@
|
|||||||
</DrawerOverlay>
|
</DrawerOverlay>
|
||||||
|
|
||||||
<!--审批详情-->
|
<!--审批详情-->
|
||||||
<DrawerOverlay v-model="approveDetailsShow" placement="right" :size="600">
|
<DrawerOverlay v-model="approveDetailsShow" placement="right" :size="600">
|
||||||
<ApproveDetails v-if="approveDetailsShow" :data="approveDetails" style="height: 100%;border-radius: 10px;"></ApproveDetails>
|
<ApproveDetails v-if="approveDetailsShow" :data="approveDetails" style="height: 100%;border-radius: 10px;"></ApproveDetails>
|
||||||
</DrawerOverlay>
|
</DrawerOverlay>
|
||||||
</div>
|
</div>
|
||||||
@ -1380,13 +1380,16 @@ export default {
|
|||||||
} else if (data.type === 'replace') {
|
} else if (data.type === 'replace') {
|
||||||
item.msg.text = data.text
|
item.msg.text = data.text
|
||||||
}
|
}
|
||||||
if (tail <= 55) {
|
this.$nextTick(_ => {
|
||||||
this.operatePreventScroll++
|
const {tail: newTail} = this.scrollInfo()
|
||||||
this.$refs.scroller.scrollToBottom();
|
if (tail <= 10 && newTail != tail) {
|
||||||
setTimeout(_ => {
|
this.operatePreventScroll++
|
||||||
this.operatePreventScroll--
|
this.$refs.scroller.scrollToBottom();
|
||||||
}, 50)
|
setTimeout(_ => {
|
||||||
}
|
this.operatePreventScroll--
|
||||||
|
}, 50)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -2513,18 +2516,24 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 打开审批详情
|
// 打开审批详情
|
||||||
let domAudits = $(target).parents(".open-approve-details")
|
let approveElement = target;
|
||||||
if( domAudits.length > 0 ){
|
while (approveElement) {
|
||||||
let dataId = domAudits[0].getAttribute("data-id")
|
if (approveElement.classList.contains('open-approve-details')) {
|
||||||
if( window.innerWidth < 426 ){
|
const dataId = approveElement.getAttribute("data-id")
|
||||||
this.goForward({name: 'manage-approve-details', query: { id: domAudits[0].getAttribute("data-id") } });
|
if (window.innerWidth < 426) {
|
||||||
}else{
|
this.goForward({name: 'manage-approve-details', query: {id: approveElement.getAttribute("data-id")}});
|
||||||
this.approveDetailsShow = true;
|
} else {
|
||||||
this.$nextTick(()=>{
|
this.approveDetailsShow = true;
|
||||||
this.approveDetails = {id:dataId};
|
this.$nextTick(() => {
|
||||||
})
|
this.approveDetails = {id: dataId};
|
||||||
|
})
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return;
|
if (approveElement.classList.contains('dialog-item')) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
approveElement = approveElement.parentElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (target.nodeName) {
|
switch (target.nodeName) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user