mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
perf: 优化菜单显示位置
This commit is contained in:
parent
b3a30720fa
commit
96b0cb8aa0
@ -1053,12 +1053,11 @@ export default {
|
||||
this.operateVisible = false;
|
||||
this.operateItem = $A.isJson(projectItem) ? projectItem : {};
|
||||
this.$nextTick(() => {
|
||||
const projectRect = el.getBoundingClientRect();
|
||||
const wrapRect = this.$refs.menuProject.getBoundingClientRect();
|
||||
const rect = el.getBoundingClientRect();
|
||||
this.operateStyles = {
|
||||
left: `${event.clientX - wrapRect.left}px`,
|
||||
top: `${projectRect.top + this.windowScrollY}px`,
|
||||
height: projectRect.height + 'px',
|
||||
left: `${event.clientX}px`,
|
||||
top: `${rect.top + this.windowScrollY}px`,
|
||||
height: rect.height + 'px',
|
||||
}
|
||||
this.operateVisible = true;
|
||||
})
|
||||
|
||||
@ -2680,12 +2680,11 @@ export default {
|
||||
}
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
const projectRect = el.getBoundingClientRect();
|
||||
const wrapRect = this.$el.getBoundingClientRect();
|
||||
const rect = el.getBoundingClientRect();
|
||||
this.operateStyles = {
|
||||
left: `${event.clientX - wrapRect.left}px`,
|
||||
top: `${projectRect.top + this.windowScrollY}px`,
|
||||
height: projectRect.height + 'px',
|
||||
left: `${event.clientX}px`,
|
||||
top: `${rect.top + this.windowScrollY}px`,
|
||||
height: rect.height + 'px',
|
||||
}
|
||||
this.operateClient = {x: event.clientX, y: event.clientY};
|
||||
this.operateVisible = true;
|
||||
|
||||
@ -179,12 +179,11 @@ export default {
|
||||
this.operateVisible = false;
|
||||
this.operateItem = $A.isJson(projectItem) ? projectItem : {};
|
||||
this.$nextTick(() => {
|
||||
const projectRect = el.getBoundingClientRect();
|
||||
const wrapRect = this.$el.getBoundingClientRect();
|
||||
const rect = el.getBoundingClientRect();
|
||||
this.operateStyles = {
|
||||
left: `${event.clientX - wrapRect.left}px`,
|
||||
top: `${projectRect.top + this.windowScrollY}px`,
|
||||
height: projectRect.height + 'px',
|
||||
left: `${event.clientX}px`,
|
||||
top: `${rect.top + this.windowScrollY}px`,
|
||||
height: rect.height + 'px',
|
||||
}
|
||||
this.operateVisible = true;
|
||||
})
|
||||
|
||||
@ -977,12 +977,11 @@ export default {
|
||||
this.operateVisible = false;
|
||||
this.operateItem = $A.isJson(dialogItem) ? dialogItem : {};
|
||||
this.$nextTick(() => {
|
||||
const dialogRect = el.getBoundingClientRect();
|
||||
const wrapRect = this.$refs.list.$el.getBoundingClientRect();
|
||||
const rect = el.getBoundingClientRect();
|
||||
this.operateStyles = {
|
||||
left: `${event.clientX - wrapRect.left}px`,
|
||||
top: `${dialogRect.top - dialogRect.height + this.windowScrollY}px`,
|
||||
height: dialogRect.height + 'px',
|
||||
left: `${event.clientX}px`,
|
||||
top: `${rect.top + this.windowScrollY}px`,
|
||||
height: rect.height + 'px',
|
||||
}
|
||||
this.operateVisible = true;
|
||||
})
|
||||
|
||||
@ -1754,7 +1754,7 @@
|
||||
}
|
||||
|
||||
.operate-position {
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 1px;
|
||||
|
||||
@ -183,7 +183,7 @@
|
||||
}
|
||||
|
||||
.operate-position {
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 1px;
|
||||
|
||||
2
resources/assets/sass/pages/page-manage.scss
vendored
2
resources/assets/sass/pages/page-manage.scss
vendored
@ -206,7 +206,7 @@
|
||||
}
|
||||
}
|
||||
.operate-position {
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 1px;
|
||||
|
||||
@ -463,12 +463,11 @@
|
||||
}
|
||||
}
|
||||
.operate-position {
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 1px;
|
||||
opacity: 0;
|
||||
margin-top: -4px;
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user