Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Avoid scrollbar on database item template switch https://github.com/siyuan-note/siyuan/issues/18532

Danielf8f41e6cf407
diff --git a/app/src/assets/scss/business/_av.scss b/app/src/assets/scss/business/_av.scss
index 5155b460b4..cce754f2a9 100644
--- a/app/src/assets/scss/business/_av.scss
+++ b/app/src/assets/scss/business/_av.scss
@@ -229,6 +229,17 @@
}
}
+ &__template-editor .custom-attr__avvalue.av__template-switch {
+ cursor: default;
+ flex: 1;
+ min-width: 0;
+ overflow: visible;
+
+ &:hover {
+ background-color: transparent;
+ }
+ }
+
&__template-editor .custom-attr .block__logo:not(.popover__block) {
cursor: default;
diff --git a/app/src/protyle/render/av/newItemTemplate.ts b/app/src/protyle/render/av/newItemTemplate.ts
index b98bba7ea4..8db8ec8abc 100644
--- a/app/src/protyle/render/av/newItemTemplate.ts
+++ b/app/src/protyle/render/av/newItemTemplate.ts
@@ -549,7 +549,7 @@ const getEditorHTML = (itemTemplate: IAVNewItemTemplate, primaryKey: IAVColumn |
</div>
<div class="block__icons av__row">
<div class="block__logo block__logo--icon"><svg class="block__logoicon"><use xlink:href="#iconEyeoff"></use></svg><span>${window.siyuan.languages.hideInFileTree}</span></div>
- <div class="fn__flex-1 fn__flex custom-attr__avvalue custom-attr__avvalue--readonly" style="align-items:center;justify-content:flex-end"><input class="b3-switch fn__flex-center" data-role="hide-in-file-tree" type="checkbox"${itemTemplate.hideInFileTree ? " checked" : ""}></div>
+ <div class="fn__flex custom-attr__avvalue av__template-switch" style="align-items:center;justify-content:flex-end"><input class="b3-switch" data-role="hide-in-file-tree" type="checkbox"${itemTemplate.hideInFileTree ? " checked" : ""}></div>
</div>
<div class="block__icons av__row">
<div class="block__logo block__logo--icon"><svg class="block__logoicon"><use xlink:href="#iconFile"></use></svg><span>${window.siyuan.languages.contentTemplate}</span></div>