mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-26 20:48:12 +00:00
fix: 消息太长导致菜单无法正常显示
This commit is contained in:
parent
6218521dea
commit
3596475790
@ -2748,10 +2748,20 @@ export default {
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
const rect = el.getBoundingClientRect();
|
||||
const scrollerRect = this.$refs.scroller.$el.getBoundingClientRect();
|
||||
let top = rect.top + this.windowScrollY,
|
||||
height = rect.height;
|
||||
if (rect.top < scrollerRect.top) {
|
||||
top = scrollerRect.top
|
||||
height -= scrollerRect.top - rect.top
|
||||
}
|
||||
if (rect.bottom > scrollerRect.bottom) {
|
||||
height -= rect.bottom - scrollerRect.bottom
|
||||
}
|
||||
this.operateStyles = {
|
||||
left: `${event.clientX}px`,
|
||||
top: `${rect.top + this.windowScrollY}px`,
|
||||
height: rect.height + 'px',
|
||||
top: `${top}px`,
|
||||
height: `${height}px`,
|
||||
}
|
||||
this.operateClient = {x: event.clientX, y: event.clientY};
|
||||
this.operateVisible = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user