Skip to content

Commit

Permalink
🎨 fix #7743
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 authored and 88250 committed Mar 28, 2023
1 parent 4593c23 commit 3ce69b5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/src/assets/scss/protyle/_attr.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
}

&--refcount {
right: -26px;
right: -20px;
top: 18px;
position: absolute;
line-height: 16px;
Expand Down
15 changes: 10 additions & 5 deletions app/src/layout/dock/Backlink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -574,19 +574,24 @@ export class Backlink extends Model {
if (data.mentionsCount === 0) {
this.status[this.blockId].backlinkMStatus = 3;
} else {
Array.from({length: window.siyuan.config.editor.backlinkExpandCount}).forEach((item, index) => {
Array.from({length: window.siyuan.config.editor.backmentionExpandCount}).forEach((item, index) => {
if (data.backmentions[index]) {
this.status[this.blockId].backlinkMOpenIds.push(data.backmentions[index].id);
}
});
if (data.linkRefsCount === 0) {
this.status[this.blockId].backlinkMStatus = 0;
if (window.siyuan.config.editor.backmentionExpandCount === 0) {
// 设置为 0 时需折叠
this.status[this.blockId].backlinkMStatus = 3;
} else {
this.status[this.blockId].backlinkMStatus = 1;
if (data.linkRefsCount === 0) {
this.status[this.blockId].backlinkMStatus = 0;
} else {
this.status[this.blockId].backlinkMStatus = 1;
}
}
}
if (data.linkRefsCount > 0) {
Array.from({length: window.siyuan.config.editor.backmentionExpandCount}).forEach((item, index) => {
Array.from({length: window.siyuan.config.editor.backlinkExpandCount}).forEach((item, index) => {
if (data.backlinks[index]) {
this.status[this.blockId].backlinkOpenIds.push(data.backlinks[index].id);
}
Expand Down

0 comments on commit 3ce69b5

Please sign in to comment.