fix: 改进斜杠菜单的元素高度 (#14000)

* fix: 改进斜杠菜单的元素高度

fix https://github.com/siyuan-note/siyuan/issues/13912

* fix: 改进斜杠菜单的元素高度

fix https://github.com/siyuan-note/siyuan/issues/13912
This commit is contained in:
Jeffrey Chen 2025-02-03 11:34:43 +08:00 committed by GitHub
parent 60c47a5e5d
commit d406c1cbb3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -62,7 +62,7 @@
background-color: var(--b3-menu-background);
z-index: 5;
overflow: auto;
max-height: 402px;
max-height: min(402px, 40vh);
// 不能使用否则 hint emoji 出现双滚动条 box-sizing: border-box;
padding: 8px 0;
display: flex;

View file

@ -50,7 +50,7 @@ export class Dialog {
}
this.element.innerHTML = `<div class="b3-dialog" style="z-index: ${++window.siyuan.zIndex};${typeof left === "string" ? "display:block" : ""}">
<div class="b3-dialog__scrim"${options.transparent ? 'style="background-color:transparent"' : ""}></div>
<div class="b3-dialog__container ${options.containerClassName}" style="width:${options.width || "auto"};height:${options.height || "auto"};left:${left};top:${top}">
<div class="b3-dialog__container${options.containerClassName ? ` ${options.containerClassName}` : ""}" style="width:${options.width || "auto"};height:${options.height || "auto"};${left ? `left:${left};` : ""}${top ? `top:${top}` : ""}">
<svg ${(isMobile() && options.title) ? 'style="top:0;right:0;"' : ""} class="b3-dialog__close${(this.disableClose || options.hideCloseIcon) ? " fn__none" : ""}"><use xlink:href="#iconCloseRound"></use></svg>
<div class="resize__move b3-dialog__header${options.title ? "" : " fn__none"}" onselectstart="return false;">${options.title || ""}</div>
<div class="b3-dialog__body">${options.content}</div>

View file

@ -374,8 +374,8 @@ ${genHintItemHTML(item)}
}
lazyLoadEmojiImg(panelElement);
} else {
// 402 和 .protyle-hint 保持一致,用户 /emoji
this.element.innerHTML = `<div style="padding: 0;max-height:402px;width:360px" class="emojis">
// /emoji 菜单min(402px,40vh) 和 .protyle-hint 保持一致,否则不显示底部导航栏
this.element.innerHTML = `<div style="padding:0;max-height:min(402px,40vh);width:368px" class="emojis">
<div class="emojis__panel">${filterEmoji(value, 256)}</div>
<div class="fn__flex${value ? " fn__none" : ""}">
${[