This commit is contained in:
parent
8747ca3a87
commit
df502ec42a
2 changed files with 11 additions and 6 deletions
|
@ -36,7 +36,7 @@
|
|||
}
|
||||
|
||||
&--refcount {
|
||||
right: -26px;
|
||||
right: -20px;
|
||||
top: 18px;
|
||||
position: absolute;
|
||||
line-height: 16px;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue