Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/15154

Vanessa425b9ac44981
diff --git a/app/src/assets/scss/business/_av.scss b/app/src/assets/scss/business/_av.scss
index 1ed970a555..c7d164fd72 100644
--- a/app/src/assets/scss/business/_av.scss
+++ b/app/src/assets/scss/business/_av.scss
@@ -383,40 +383,40 @@
min-height: 23px;
padding: 5px 4px;
+ &--wrap {
+ word-break: break-all;
+ white-space: pre-wrap;
+ }
+
.av__cell {
padding: 2px 4px;
border-right: 0;
+ min-height: calc(1.625em + 4px);
- .block__icon {
- display: none;
+ &:not([data-dtype="block"])[data-empty="true"] {
+ padding: 0 4px;
+ min-height: auto;
}
&:hover {
background-color: var(--b3-list-hover);
border-radius: var(--b3-border-radius);
- .b3-chip[data-type=block-more] {
- top: 2px;
+ .b3-chip[data-type="block-more"] {
+ top: 4px;
display: block;
}
}
+ .block__icon {
+ display: none;
+ }
+
&[data-dtype="created"],
&[data-dtype="updated"],
&[data-dtype="lineNumber"] {
cursor: default;
}
- }
-
- &--wrap {
- word-break: break-all;
- white-space: pre-wrap;
- }
-
- &:not(.av__gallery-fields--edit) .av__cell {
- &[data-empty="true"] {
- padding: 0 4px;
- }
&[data-dtype="mAsset"],
&[data-dtype="mSelect"],
@@ -425,21 +425,18 @@
}
}
- &--edit {
- .av__cell {
- min-height: 1.625em;
- }
+ &--edit .av__cell {
+ padding: 2px 4px !important;
+ min-height: calc(1.625em + 4px) !important;
- .av__cell[data-empty="true"] .av__gallery-tip {
- display: flex;
+ &[data-dtype="mAsset"][data-empty="true"],
+ &[data-dtype="mSelect"][data-empty="true"],
+ &[data-dtype="select"][data-empty="true"] {
+ margin-left: 0;
}
- .av__cell {
- &[data-dtype="mAsset"][data-empty="false"],
- &[data-dtype="mSelect"][data-empty="false"],
- &[data-dtype="select"][data-empty="false"] {
- margin-left: -2px;
- }
+ &[data-empty="true"] .av__gallery-tip {
+ display: flex;
}
}
}
diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts
index d32921a87b..0991f9aae9 100644
--- a/app/src/protyle/render/av/cell.ts
+++ b/app/src/protyle/render/av/cell.ts
@@ -496,9 +496,9 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[], type
height = contentRect.bottom - cellRect.top;
}
const width = Math.min(Math.max(cellRect.width, 25), contentRect.width);
- style = `style="padding-top: ${viewType === "table" ? 6.5 : 1}px;position:absolute;left: ${(cellRect.left < contentRect.left || cellRect.left + width > contentRect.right) ? contentRect.left : cellRect.left}px;top: ${cellRect.top}px;width:${width}px;height: ${height}px"`;
+ style = `style="padding: ${viewType === "table" ? 6 : 3}px 8px;position:absolute;left: ${(cellRect.left < contentRect.left || cellRect.left + width > contentRect.right) ? contentRect.left : cellRect.left}px;top: ${cellRect.top}px;width:${width}px;height: ${height}px"`;
} else {
- style = `style="padding-top: ${viewType === "table" ? 6.5 : 1}px;position:absolute;left: ${cellRect.left}px;top: ${cellRect.top}px;width:${Math.max(cellRect.width, 25)}px;height: ${height}px"`;
+ style = `style="padding: ${viewType === "table" ? 6 : 3}px 8px;position:absolute;left: ${cellRect.left}px;top: ${cellRect.top}px;width:${Math.max(cellRect.width, 25)}px;height: ${height}px"`;
}
if (["text", "email", "phone", "block", "template"].includes(type)) {