mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
8cce186b47
commit
87c8db09a0
3 changed files with 38 additions and 35 deletions
|
|
@ -81,14 +81,14 @@ export class Tree {
|
|||
style = `padding-left: ${(item.depth - 1) * 20 + 24}px`;
|
||||
}
|
||||
} else {
|
||||
style = `padding-left: ${(item.depth - 1) * 18 + 22}px;margin-right: 2px`;
|
||||
style = `padding-left: ${(item.depth * 18) || 4}px;margin-right: 2px`;
|
||||
}
|
||||
const showArrow = hasChild || (item.type === "backlink" && !isMobile());
|
||||
// data-id 需要添加 item.id,否则大纲更新时 name 不一致导致 https://github.com/siyuan-note/siyuan/issues/11843
|
||||
html += `<li class="b3-list-item${isMobile() ? "" : " b3-list-item--hide-action"}"
|
||||
${item.id ? 'data-node-id="' + item.id + '"' : ""}
|
||||
${item.box ? 'data-notebook-id="' + item.box + '"' : ""}
|
||||
style="--file-toggle-width:${(item.depth - 1) * 18 + 38}px"
|
||||
style="--file-toggle-width:${item.depth === 0 ? 22 : ((item.depth + 1) * 18)}px"
|
||||
data-treetype="${item.type}"
|
||||
data-type="${item.nodeType}"
|
||||
data-subtype="${item.subType}"
|
||||
|
|
@ -140,10 +140,10 @@ ${item.label ? "data-label='" + item.label + "'" : ""}>
|
|||
style = `padding-left: ${(item.depth - 1) * 20 + 24}px`;
|
||||
}
|
||||
} else {
|
||||
style = `padding-left: ${(item.depth - 1) * 18 + 22}px;margin-right: 2px`;
|
||||
style = `padding-left: ${item.depth * 18 || 4}px;margin-right: 2px`;
|
||||
}
|
||||
html += `<li class="b3-list-item${isMobile() ? "" : " b3-list-item--hide-action"}"
|
||||
style="--file-toggle-width:${(item.depth - 1) * 18 + 38}px"
|
||||
style="--file-toggle-width:${item.depth === 0 ? 22 : ((item.depth + 1) * 18)}px"
|
||||
data-node-id="${item.id}"
|
||||
data-ref-text="${encodeURIComponent(item.refText)}"
|
||||
data-def-id="${item.defID}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue