From 0a4c0c01fe444098bb5e461694b8dfbebca542e4 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 10 Jan 2026 16:04:52 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/16805 --- app/src/assets/scss/protyle/_wysiwyg.scss | 18 +++++++++++++++--- app/src/protyle/gutter/index.ts | 7 ++++--- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/app/src/assets/scss/protyle/_wysiwyg.scss b/app/src/assets/scss/protyle/_wysiwyg.scss index d97beb724..45fbfab2a 100644 --- a/app/src/assets/scss/protyle/_wysiwyg.scss +++ b/app/src/assets/scss/protyle/_wysiwyg.scss @@ -238,6 +238,13 @@ border-radius: var(--b3-border-radius); } } + + & > div[fold="1"][data-type="NodeHeading"]::before { + left: -6px; + height: 7px; + width: 7px; + margin-top: -4px; + } } &[style*="direction: rtl"] { @@ -633,18 +640,23 @@ div[fold="1"][data-type="NodeHeading"]::before { content: ""; - height: 16px !important; + height: 16px; width: 16px; background: var(--b3-theme-surface-lighter); display: block; position: absolute; - left: -18px !important; - top: 50% !important; + left: -18px; + top: 50%; border-radius: var(--b3-border-radius-b); margin-top: -8px; border-left: 0 !important; } + .bq > div[fold="1"][data-type="NodeHeading"]::before, + .callout-content > div[fold="1"][data-type="NodeHeading"]::before { + left: -26px; + } + [data-node-id][fold="1"]:not(.li):not([data-type="NodeHeading"]) { @include mixin.text-clamp(1); opacity: .38; diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts index 4b951e42d..7d53c03b4 100644 --- a/app/src/protyle/gutter/index.ts +++ b/app/src/protyle/gutter/index.ts @@ -37,7 +37,7 @@ import {highlightRender} from "../render/highlightRender"; import {blockRender} from "../render/blockRender"; import {getContenteditableElement, getParentBlock, getTopAloneElement, isNotEditBlock} from "../wysiwyg/getBlock"; import * as dayjs from "dayjs"; -import {fetchPost, fetchSyncPost} from "../../util/fetch"; +import {fetchPost} from "../../util/fetch"; import {cancelSB, genEmptyElement, getLangByType, insertEmptyBlock, jumpToParent,} from "../../block/util"; import {countBlockWord} from "../../layout/status"; import {Constants} from "../../constants"; @@ -2557,8 +2557,9 @@ export class Gutter { dataNodeId = nodeElement.getAttribute("data-node-id"); } } - if (type === "NodeListItem" && index === 1) { - // 列表项中第一层不显示 + // - > # 1 \n > 2 + if (type === "NodeListItem" && index > 0) { + // 列表项内的块不显示块标 html = ""; } index += 1;