فهرست منبع

:art: fix https://github.com/siyuan-note/siyuan/issues/5017

Vanessa 3 سال پیش
والد
کامیت
8dbc19c1fe
2فایلهای تغییر یافته به همراه8 افزوده شده و 4 حذف شده
  1. 1 0
      app/src/assets/scss/_protyle.scss
  2. 7 4
      app/src/layout/dock/Bookmark.ts

+ 1 - 0
app/src/assets/scss/_protyle.scss

@@ -118,6 +118,7 @@
     margin-right: 8px;
     margin-right: 8px;
     overflow: auto;
     overflow: auto;
     flex: 1;
     flex: 1;
+    min-height: 30px;
 
 
     &::-webkit-scrollbar {
     &::-webkit-scrollbar {
       display: none;
       display: none;

+ 7 - 4
app/src/layout/dock/Bookmark.ts

@@ -77,10 +77,13 @@ export class Bookmark extends Model {
             element: this.element.lastElementChild as HTMLElement,
             element: this.element.lastElementChild as HTMLElement,
             data: null,
             data: null,
             click(element: HTMLElement) {
             click(element: HTMLElement) {
-                openFileById({
-                    id: element.getAttribute("data-node-id"),
-                    hasContext: true,
-                    action: [Constants.CB_GET_FOCUS]
+                const id =  element.getAttribute("data-node-id")
+                fetchPost("/api/block/checkBlockFold", {id}, (foldResponse) => {
+                    openFileById({
+                        id,
+                        hasContext: !foldResponse.data,
+                        action: foldResponse.data ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL] : [Constants.CB_GET_FOCUS],
+                    });
                 });
                 });
             },
             },
             rightClick: (element: HTMLElement, event: MouseEvent) => {
             rightClick: (element: HTMLElement, event: MouseEvent) => {