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