This commit is contained in:
Vanessa 2022-07-31 18:22:03 +08:00
parent 3a3bd13ff5
commit cddb7a7a25
6 changed files with 7 additions and 10 deletions

View file

@ -8,7 +8,6 @@ import {updateHotkeyTip} from "../../protyle/util/compatibility";
import {openFileById} from "../../editor/util";
import {Constants} from "../../constants";
import {Dialog} from "../../dialog";
import {isMobile} from "../../util/functions";
import {confirmDialog} from "../../dialog/confirmDialog";
import {escapeHtml} from "../../util/escape";

View file

@ -7,7 +7,6 @@ import {updateHotkeyTip} from "../../protyle/util/compatibility";
import {openGlobalSearch} from "../../search/util";
import {MenuItem} from "../../menus/Menu";
import {Dialog} from "../../dialog";
import {isMobile} from "../../util/functions";
import {confirmDialog} from "../../dialog/confirmDialog";
import {escapeHtml} from "../../util/escape";

View file

@ -6,7 +6,6 @@ import {openMobileFileById} from "../editor";
import {confirmDialog} from "../../dialog/confirmDialog";
import {escapeHtml} from "../../util/escape";
import {Dialog} from "../../dialog";
import {isMobile} from "../../util/functions";
export class MobileBookmarks {
public element: HTMLElement;
@ -111,7 +110,7 @@ export class MobileBookmarks {
}
public update() {
this.element.lastElementChild.classList.remove("fn__none")
this.element.lastElementChild.classList.remove("fn__none");
fetchPost("/api/bookmark/getBookmark", {}, response => {
if (this.openNodes) {
this.openNodes = this.tree.getExpandIds();
@ -122,7 +121,7 @@ export class MobileBookmarks {
} else {
this.openNodes = this.tree.getExpandIds();
}
this.element.lastElementChild.classList.add("fn__none")
this.element.lastElementChild.classList.add("fn__none");
});
}
}

View file

@ -154,7 +154,7 @@ export class MobileTags {
}
public update() {
this.element.lastElementChild.classList.remove("fn__none")
this.element.lastElementChild.classList.remove("fn__none");
fetchPost("/api/tag/getTag", {
sort: window.siyuan.config.tag.sort
}, response => {
@ -167,7 +167,7 @@ export class MobileTags {
} else {
this.openNodes = this.tree.getExpandIds();
}
this.element.lastElementChild.classList.add("fn__none")
this.element.lastElementChild.classList.add("fn__none");
});
}
}

View file

@ -23,8 +23,8 @@ export const initFramework = () => {
const sidebarElement = document.getElementById("sidebar");
let outline: MobileOutline;
let backlink: MobileBacklinks;
let bookmark: MobileBookmarks
let tag: MobileTags
let bookmark: MobileBookmarks;
let tag: MobileTags;
sidebarElement.querySelector(".toolbar--border").addEventListener(getEventName(), (event: Event & { target: Element }) => {
const svgElement = hasTopClosestByTag(event.target, "svg");
if (!svgElement || svgElement.classList.contains("toolbar__icon--active")) {

View file

@ -190,7 +190,7 @@ data-def-path="${item.defPath}">
}
if (target.classList.contains("b3-list-item__action") && this.click) {
// 移动端书签父节点删除按钮
const liElement = hasClosestByMatchTag(target, "LI")
const liElement = hasClosestByMatchTag(target, "LI");
if (liElement) {
this.click(liElement, event);
}