mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
parent
95a2bd0a83
commit
bf1172b05e
2 changed files with 15 additions and 2 deletions
|
|
@ -91,6 +91,17 @@ export const onGet = (options: {
|
|||
isSyncing: options.data.data.isSyncing,
|
||||
afterCB: options.afterCB,
|
||||
}, options.protyle);
|
||||
|
||||
// 如果需要渲染标题且包含 CB_GET_HTML,需要获取文档信息来更新标题
|
||||
if (options.protyle.options.render.title && options.action.includes(Constants.CB_GET_HTML)) {
|
||||
fetchPost("/api/block/getDocInfo", {
|
||||
id: options.protyle.block.rootID
|
||||
}, (response) => {
|
||||
options.protyle.title.element.removeAttribute("data-render");
|
||||
options.protyle.title.render(options.protyle, response);
|
||||
});
|
||||
}
|
||||
|
||||
removeLoading(options.protyle);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -239,7 +239,8 @@ export const genSearch = (app: App, config: Config.IUILayoutTabSearchConfig, ele
|
|||
blockId: "",
|
||||
render: {
|
||||
gutter: true,
|
||||
breadcrumbDocName: true
|
||||
breadcrumbDocName: true,
|
||||
title: true
|
||||
},
|
||||
});
|
||||
edit.resize();
|
||||
|
|
@ -247,7 +248,8 @@ export const genSearch = (app: App, config: Config.IUILayoutTabSearchConfig, ele
|
|||
blockId: "",
|
||||
render: {
|
||||
gutter: true,
|
||||
breadcrumbDocName: true
|
||||
breadcrumbDocName: true,
|
||||
title: true
|
||||
},
|
||||
});
|
||||
unRefEdit.resize();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue