Vanessa 2025-02-27 17:30:07 +08:00
parent 93bb1c485c
commit ee9a02f904
2 changed files with 16 additions and 4 deletions

View File

@ -50,7 +50,7 @@
.b3-menu { .b3-menu {
&__submenu { &__submenu {
top: 48px; top: 48px;
left: 0; left: 100vw;
bottom: 0; bottom: 0;
max-height: none; max-height: none;
right: 0; right: 0;
@ -58,6 +58,9 @@
border: 0; border: 0;
padding: 0; padding: 0;
border-radius: 0; border-radius: 0;
width: 100%;
transition: transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms;
display: block;
& > .b3-menu__item:first-child { & > .b3-menu__item:first-child {
border-top: .5px solid var(--b3-theme-background-light); border-top: .5px solid var(--b3-theme-background-light);
@ -81,8 +84,14 @@
border-top: .5px solid var(--b3-theme-background-light); border-top: .5px solid var(--b3-theme-background-light);
} }
&--show > .b3-menu__submenu--row { &--show {
width: 100%; & > .b3-menu__submenu {
transform: translateX(-100vw);
}
& > .b3-menu__submenu--row {
width: 100%;
}
} }
&--readonly { &--readonly {

View File

@ -24,7 +24,10 @@ export class Menu {
if (lastShowElements.length > 0) { if (lastShowElements.length > 0) {
lastShowElements[lastShowElements.length - 1].classList.remove("b3-menu__item--show"); lastShowElements[lastShowElements.length - 1].classList.remove("b3-menu__item--show");
} else { } else {
this.remove(); this.element.style.transform = "";
setTimeout(() => {
this.remove();
}, Constants.TIMEOUT_DBLCLICK);
} }
return; return;
} }