mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-17 01:21:14 +08:00
This commit is contained in:
parent
82fe12d84b
commit
b166fd87cd
@ -83,15 +83,15 @@ export class Tree {
|
||||
} else {
|
||||
style = `padding-left: ${(item.depth - 1) * 18 + 22}px;margin-right: 2px`;
|
||||
}
|
||||
const showArrow = hasChild || (item.type === "backlink" && !isMobile());
|
||||
html += `<li class="b3-list-item${isMobile() ? "" : " b3-list-item--hide-action"}"
|
||||
${(item.nodeType !== "NodeDocument" && item.type === "backlink") ? 'draggable="true" ' : ""}
|
||||
${item.id ? 'data-node-id="' + item.id + '"' : ""}
|
||||
${item.box ? 'data-notebook-id="' + item.box + '"' : ""}
|
||||
data-treetype="${item.type}"
|
||||
data-type="${item.nodeType}"
|
||||
data-subtype="${item.subType}"
|
||||
${item.label ? "data-label='" + item.label + "'" : ""}>
|
||||
<span style="${style}" class="b3-list-item__toggle${(item.type === "backlink" || hasChild) ? " b3-list-item__toggle--hl" : ""}${hasChild || item.type === "backlink" ? "" : " fn__hidden"}">
|
||||
<span style="${style}" class="b3-list-item__toggle${showArrow ? " b3-list-item__toggle--hl" : ""}${showArrow ? "" : " fn__hidden"}">
|
||||
<svg data-id="${encodeURIComponent(item.name + item.depth)}" class="b3-list-item__arrow${hasChild ? " b3-list-item__arrow--open" : ""}"><use xlink:href="#iconRight"></use></svg>
|
||||
</span>
|
||||
${iconHTML}
|
||||
@ -140,8 +140,7 @@ ${item.label ? "data-label='" + item.label + "'" : ""}>
|
||||
} else {
|
||||
style = `padding-left: ${(item.depth - 1) * 18 + 22}px;margin-right: 2px`;
|
||||
}
|
||||
html += `<li ${type === "backlink" ? 'draggable="true"' : ""}
|
||||
class="b3-list-item${isMobile() ? "" : " b3-list-item--hide-action"}"
|
||||
html += `<li class="b3-list-item${isMobile() ? "" : " b3-list-item--hide-action"}"
|
||||
data-node-id="${item.id}"
|
||||
data-ref-text="${encodeURIComponent(item.refText)}"
|
||||
data-def-id="${item.defID}"
|
||||
|
Loading…
Reference in New Issue
Block a user