This commit is contained in:
Vanessa 2023-03-16 19:40:45 +08:00
parent 152bb39fee
commit 7a8d4d4e62
2 changed files with 53 additions and 17 deletions

View file

@ -35,19 +35,60 @@
bottom: 0; bottom: 0;
right: 0; right: 0;
max-height: none; max-height: none;
padding: 0;
.b3-menu__submenu { .b3-menu {
top: 45px; &__submenu {
left: 0; top: 45px;
bottom: 0; left: 0;
max-height: none; bottom: 0;
right: 0; max-height: none;
box-shadow: none; right: 0;
border: 0; box-shadow: none;
} border: 0;
}
.b3-menu__item--show > .b3-menu__submenu--row { &__item {
width: 100%; border-bottom: 1px solid var(--b3-theme-background-light);
line-height: 40px;
&:last-child {
border-bottom-width: 0;
}
&--show > .b3-menu__submenu--row {
width: 100%;
}
&--readonly {
line-height: 24px;
padding-left: 16px;
}
}
&__title {
border-bottom: 1px solid var(--b3-theme-background-light);
line-height: 40px;
padding: 0 8px;
display: flex;
}
&__separator {
margin: 0;
height: 16px;
background-color: var(--b3-theme-background);
border-bottom: 1px solid var(--b3-theme-background-light);
}
&__label {
font-size: 16px;
}
&__icon {
height: 16px;
width: 16px;
margin: 0 16px 0 8px;
}
} }
} }
@ -64,11 +105,6 @@
} }
} }
&__title {
padding: 8px;
display: flex;
}
&__item { &__item {
padding: 0 8px; padding: 0 8px;
border-radius: 4px; border-radius: 4px;

View file

@ -125,7 +125,7 @@ export class Menu {
this.element.insertAdjacentHTML("afterbegin", `<div class="b3-menu__title"> this.element.insertAdjacentHTML("afterbegin", `<div class="b3-menu__title">
<svg class="b3-menu__icon"><use xlink:href="#iconLeft"></use></svg> <svg class="b3-menu__icon"><use xlink:href="#iconLeft"></use></svg>
<span class="b3-menu__label">${window.siyuan.languages.back}</span> <span class="b3-menu__label">${window.siyuan.languages.back}</span>
</div>`); </div><button class="b3-menu__separator"></button>`);
this.popup({x: 0, y: 0}); this.popup({x: 0, y: 0});
} }
} }