mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-03-16 22:10:27 +00:00
fix bottom-right position
This commit is contained in:
parent
3897394153
commit
495c3b77bf
2 changed files with 6 additions and 16 deletions
|
|
@ -16,6 +16,7 @@ $menu-base-width: 56px;
|
|||
overflow-y: auto;
|
||||
position: fixed;
|
||||
z-index: 120;
|
||||
clip-path: inset(-8px 10% 16% -8px);
|
||||
background-color: #fff;
|
||||
border-radius: 2px;
|
||||
filter: drop-shadow(0 1px 1px rgba(#000, $shadow-key-umbra-opacity))
|
||||
|
|
@ -42,7 +43,7 @@ $menu-base-width: 56px;
|
|||
&.md-direction-top-right {
|
||||
margin-top: 11px;
|
||||
margin-left: -8px;
|
||||
clip-path: inset(-8px 16% -8px 10%);
|
||||
clip-path: inset(16% 10% -8px -8px);
|
||||
}
|
||||
|
||||
&.md-direction-top-left {
|
||||
|
|
|
|||
|
|
@ -112,21 +112,10 @@
|
|||
calculateMenuContentPos() {
|
||||
let position;
|
||||
|
||||
switch (this.mdDirection) {
|
||||
case 'bottom left':
|
||||
position = this.getPosition('bottom', 'left');
|
||||
break;
|
||||
|
||||
case 'top left':
|
||||
position = this.getPosition('top', 'left');
|
||||
break;
|
||||
|
||||
case 'top right':
|
||||
position = this.getPosition('top', 'right');
|
||||
break;
|
||||
|
||||
default:
|
||||
position = this.getPosition('bottom', 'right');
|
||||
if (!this.mdDirection) {
|
||||
position = this.getPosition('bottom', 'right');
|
||||
} else {
|
||||
position = this.getPosition.apply(this, this.mdDirection.trim().split(' '));
|
||||
}
|
||||
|
||||
position = getInViewPosition(this.menuContent, position);
|
||||
|
|
|
|||
Loading…
Reference in a new issue