From d406c1cbb31b7404c4ffe91b650cc7f9c8690623 Mon Sep 17 00:00:00 2001 From: Jeffrey Chen <78434827+TCOTC@users.noreply.github.com> Date: Mon, 3 Feb 2025 11:34:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=B9=E8=BF=9B=E6=96=9C=E6=9D=A0?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=9A=84=E5=85=83=E7=B4=A0=E9=AB=98=E5=BA=A6?= =?UTF-8?q?=20(#14000)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 改进斜杠菜单的元素高度 fix https://github.com/siyuan-note/siyuan/issues/13912 * fix: 改进斜杠菜单的元素高度 fix https://github.com/siyuan-note/siyuan/issues/13912 --- app/src/assets/scss/protyle/_toolbar.scss | 2 +- app/src/dialog/index.ts | 2 +- app/src/protyle/hint/index.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/assets/scss/protyle/_toolbar.scss b/app/src/assets/scss/protyle/_toolbar.scss index c5e8fc41e..68efa97ca 100644 --- a/app/src/assets/scss/protyle/_toolbar.scss +++ b/app/src/assets/scss/protyle/_toolbar.scss @@ -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; diff --git a/app/src/dialog/index.ts b/app/src/dialog/index.ts index 0e1712dc3..dda50dfcb 100644 --- a/app/src/dialog/index.ts +++ b/app/src/dialog/index.ts @@ -50,7 +50,7 @@ export class Dialog { } this.element.innerHTML = `
-
+
${options.title || ""}
${options.content}
diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts index 7d50a0dd6..88433fc9a 100644 --- a/app/src/protyle/hint/index.ts +++ b/app/src/protyle/hint/index.ts @@ -374,8 +374,8 @@ ${genHintItemHTML(item)} } lazyLoadEmojiImg(panelElement); } else { - // 402 和 .protyle-hint 保持一致,用户 /emoji - this.element.innerHTML = `
+ // /emoji 菜单,min(402px,40vh) 和 .protyle-hint 保持一致,否则不显示底部导航栏 + this.element.innerHTML = `
${filterEmoji(value, 256)}
${[