🧑‍💻 Add a parameter containChildren for the kernel API /api/ref/getBacklinkDoc

接口 `/api/ref/getBacklinkDoc` 和 `/api/ref/getBackmentionDoc`  添加参数 `containChildren` 。

Co-authored-by: weizelong <1710010123@qq.com>
This commit is contained in:
Misuzu2027 2024-08-21 12:26:51 +08:00 committed by GitHub
parent 380cee6e10
commit 13140edd6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 8 deletions

View file

@ -436,7 +436,8 @@ export class Backlink extends Model {
fetchPost(isMention ? "/api/ref/getBackmentionDoc" : "/api/ref/getBacklinkDoc", {
defID: this.blockId,
refTreeID: docId,
keyword: isMention ? this.inputsElement[1].value : this.inputsElement[0].value
keyword: isMention ? this.inputsElement[1].value : this.inputsElement[0].value,
containChildren: true
}, (response) => {
svgElement.removeAttribute("disabled");
svgElement.classList.add("b3-list-item__arrow--open");

View file

@ -40,7 +40,8 @@ export const reloadProtyle = (protyle: IProtyle, focus: boolean, updateReadonly?
fetchPost(isMention ? "/api/ref/getBackmentionDoc" : "/api/ref/getBacklinkDoc", {
defID: protyle.element.getAttribute("data-defid"),
refTreeID: protyle.block.rootID,
keyword: isMention ? inputsElement[1].value : inputsElement[0].value
keyword: isMention ? inputsElement[1].value : inputsElement[0].value,
containChildren: true
}, response => {
protyle.options.backlinkData = isMention ? response.data.backmentions : response.data.backlinks;
renderBacklink(protyle, protyle.options.backlinkData);