This commit is contained in:
parent
8747ca3a87
commit
df502ec42a
2 changed files with 11 additions and 6 deletions
|
@ -36,7 +36,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&--refcount {
|
&--refcount {
|
||||||
right: -26px;
|
right: -20px;
|
||||||
top: 18px;
|
top: 18px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
|
|
|
@ -574,19 +574,24 @@ export class Backlink extends Model {
|
||||||
if (data.mentionsCount === 0) {
|
if (data.mentionsCount === 0) {
|
||||||
this.status[this.blockId].backlinkMStatus = 3;
|
this.status[this.blockId].backlinkMStatus = 3;
|
||||||
} else {
|
} 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]) {
|
if (data.backmentions[index]) {
|
||||||
this.status[this.blockId].backlinkMOpenIds.push(data.backmentions[index].id);
|
this.status[this.blockId].backlinkMOpenIds.push(data.backmentions[index].id);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (window.siyuan.config.editor.backmentionExpandCount === 0) {
|
||||||
|
// 设置为 0 时需折叠
|
||||||
|
this.status[this.blockId].backlinkMStatus = 3;
|
||||||
|
} else {
|
||||||
if (data.linkRefsCount === 0) {
|
if (data.linkRefsCount === 0) {
|
||||||
this.status[this.blockId].backlinkMStatus = 0;
|
this.status[this.blockId].backlinkMStatus = 0;
|
||||||
} else {
|
} else {
|
||||||
this.status[this.blockId].backlinkMStatus = 1;
|
this.status[this.blockId].backlinkMStatus = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (data.linkRefsCount > 0) {
|
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]) {
|
if (data.backlinks[index]) {
|
||||||
this.status[this.blockId].backlinkOpenIds.push(data.backlinks[index].id);
|
this.status[this.blockId].backlinkOpenIds.push(data.backlinks[index].id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue