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
@ -1380,13 +1380,16 @@ export default {
|
||||
} else if (data.type === 'replace') {
|
||||
item.msg.text = data.text
|
||||
}
|
||||
if (tail <= 55) {
|
||||
this.$nextTick(_ => {
|
||||
const {tail: newTail} = this.scrollInfo()
|
||||
if (tail <= 10 && newTail != tail) {
|
||||
this.operatePreventScroll++
|
||||
this.$refs.scroller.scrollToBottom();
|
||||
setTimeout(_ => {
|
||||
this.operatePreventScroll--
|
||||
}, 50)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@ -2513,18 +2516,24 @@ export default {
|
||||
}
|
||||
|
||||
// 打开审批详情
|
||||
let domAudits = $(target).parents(".open-approve-details")
|
||||
if( domAudits.length > 0 ){
|
||||
let dataId = domAudits[0].getAttribute("data-id")
|
||||
let approveElement = target;
|
||||
while (approveElement) {
|
||||
if (approveElement.classList.contains('open-approve-details')) {
|
||||
const dataId = approveElement.getAttribute("data-id")
|
||||
if (window.innerWidth < 426) {
|
||||
this.goForward({name: 'manage-approve-details', query: { id: domAudits[0].getAttribute("data-id") } });
|
||||
this.goForward({name: 'manage-approve-details', query: {id: approveElement.getAttribute("data-id")}});
|
||||
} else {
|
||||
this.approveDetailsShow = true;
|
||||
this.$nextTick(() => {
|
||||
this.approveDetails = {id: dataId};
|
||||
})
|
||||
}
|
||||
return;
|
||||
break;
|
||||
}
|
||||
if (approveElement.classList.contains('dialog-item')) {
|
||||
break;
|
||||
}
|
||||
approveElement = approveElement.parentElement;
|
||||
}
|
||||
|
||||
switch (target.nodeName) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user