This commit is contained in:
Vanessa 2023-03-25 17:13:36 +08:00
parent d6c9b60015
commit 5caf532fd6
2 changed files with 5 additions and 5 deletions

View file

@ -29,7 +29,7 @@ export const initFramework = () => {
let bookmark: MobileBookmarks; let bookmark: MobileBookmarks;
let tag: MobileTags; let tag: MobileTags;
// 不能使用 getEventName否则点击返回会展开右侧栏 // 不能使用 getEventName否则点击返回会展开右侧栏
const firstToolbarElement = sidebarElement.querySelector(".toolbar--border") const firstToolbarElement = sidebarElement.querySelector(".toolbar--border");
firstToolbarElement.addEventListener("click", (event: Event & { firstToolbarElement.addEventListener("click", (event: Event & {
target: Element target: Element
}) => { }) => {

View file

@ -77,10 +77,10 @@ export class Tree {
let style = ""; let style = "";
if (isMobile()) { if (isMobile()) {
if (item.depth > 0) { if (item.depth > 0) {
style = `padding-left: ${(item.depth - 1) * 29 + 40}px` style = `padding-left: ${(item.depth - 1) * 29 + 40}px`;
} }
} else { } else {
style = `padding-left: ${(item.depth - 1) * 18 + 22}px;margin-right: 2px` style = `padding-left: ${(item.depth - 1) * 18 + 22}px;margin-right: 2px`;
} }
html += `<li class="b3-list-item" html += `<li class="b3-list-item"
${(item.nodeType !== "NodeDocument" && item.type === "backlink") ? 'draggable="true" ' : ""} ${(item.nodeType !== "NodeDocument" && item.type === "backlink") ? 'draggable="true" ' : ""}
@ -130,10 +130,10 @@ ${item.label ? "data-label='" + item.label + "'" : ""}>
let style = ""; let style = "";
if (isMobile()) { if (isMobile()) {
if (item.depth > 0) { if (item.depth > 0) {
style = `padding-left: ${(item.depth - 1) * 29 + 40}px` style = `padding-left: ${(item.depth - 1) * 29 + 40}px`;
} }
} else { } else {
style = `padding-left: ${(item.depth - 1) * 18 + 22}px;margin-right: 2px` style = `padding-left: ${(item.depth - 1) * 18 + 22}px;margin-right: 2px`;
} }
html += `<li ${type === "backlink" ? 'draggable="true"' : ""} html += `<li ${type === "backlink" ? 'draggable="true"' : ""}
class="b3-list-item ${isMobile() ? "" : "b3-list-item--hide-action"}" class="b3-list-item ${isMobile() ? "" : "b3-list-item--hide-action"}"