diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts index 424335d26..f2bc1ca48 100644 --- a/app/src/protyle/util/editorCommonEvent.ts +++ b/app/src/protyle/util/editorCommonEvent.ts @@ -909,7 +909,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => { if (window.siyuan.dragElement.parentElement?.classList.contains("protyle-gutters") || // 列表项之前的点 window.siyuan.dragElement.getAttribute("data-type") === "NodeListItem") { - disabledPosition = "" + disabledPosition = ""; // gutter 文档内拖拽限制 // 排除自己及子孙 const selectedIdsData = window.siyuan.dragElement.getAttribute("data-selected-ids"); @@ -938,11 +938,11 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => { } if (window.siyuan.dragElement.getAttribute("data-type") === "NodeListItem" && targetElement.parentElement.classList.contains("li") && targetElement.previousElementSibling?.classList.contains("protyle-action")) { // 列表项不能拖入列表项中第一个元素之上 - disabledPosition = "top" + disabledPosition = "top"; } if (window.siyuan.dragElement.getAttribute("data-type") === "NodeListItem" && targetElement.nextElementSibling?.classList.contains("list")) { // 列表项不能拖入列表上方块的下面 - disabledPosition = "bottom" + disabledPosition = "bottom"; } dragoverElement = targetElement; } diff --git a/app/src/search/util.ts b/app/src/search/util.ts index b6a106764..908157123 100644 --- a/app/src/search/util.ts +++ b/app/src/search/util.ts @@ -206,13 +206,13 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: () const data = JSON.parse(localStorage.getItem(Constants.LOCAL_SEARCHEKEYS) || "{}"); if (config.layout === 1) { if (data.col) { - edit.protyle.element.style.width = data.col - edit.protyle.element.classList.remove("fn__flex-1") + edit.protyle.element.style.width = data.col; + edit.protyle.element.classList.remove("fn__flex-1"); } } else { if (data.row) { - edit.protyle.element.classList.remove("fn__flex-1") - edit.protyle.element.style.height = data.row + edit.protyle.element.classList.remove("fn__flex-1"); + edit.protyle.element.style.height = data.row; } } let clickTimeout: number; @@ -222,7 +222,7 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: () replaceInputElement.value = config.r || ""; searchInputElement.select(); - const dragElement = element.querySelector(".search__drag") + const dragElement = element.querySelector(".search__drag"); dragElement.addEventListener("mousedown", (event: MouseEvent) => { const documentSelf = document; const nextElement = dragElement.nextElementSibling as HTMLElement; @@ -714,13 +714,13 @@ const addConfigMoreMenu = async (config: ISearchOption, edit: Protyle, element: current: config.layout === 0, click() { element.querySelector(".search__layout").classList.remove("search__layout--row"); - edit.protyle.element.style.width = "" - const data = JSON.parse(localStorage.getItem(Constants.LOCAL_SEARCHEKEYS) || "{}") + edit.protyle.element.style.width = ""; + const data = JSON.parse(localStorage.getItem(Constants.LOCAL_SEARCHEKEYS) || "{}"); if (data.row) { - edit.protyle.element.style.height = data.row - edit.protyle.element.classList.remove("fn__flex-1") + edit.protyle.element.style.height = data.row; + edit.protyle.element.classList.remove("fn__flex-1"); } else { - edit.protyle.element.classList.add("fn__flex-1") + edit.protyle.element.classList.add("fn__flex-1"); } setPadding(edit.protyle); config.layout = 0; @@ -730,13 +730,13 @@ const addConfigMoreMenu = async (config: ISearchOption, edit: Protyle, element: current: config.layout === 1, click() { element.querySelector(".search__layout").classList.add("search__layout--row"); - edit.protyle.element.style.height = "" - const data = JSON.parse(localStorage.getItem(Constants.LOCAL_SEARCHEKEYS) || "{}") + edit.protyle.element.style.height = ""; + const data = JSON.parse(localStorage.getItem(Constants.LOCAL_SEARCHEKEYS) || "{}"); if (data.col) { - edit.protyle.element.style.width = data.col - edit.protyle.element.classList.remove("fn__flex-1") + edit.protyle.element.style.width = data.col; + edit.protyle.element.classList.remove("fn__flex-1"); } else { - edit.protyle.element.classList.add("fn__flex-1") + edit.protyle.element.classList.add("fn__flex-1"); } setPadding(edit.protyle); config.layout = 1; @@ -807,20 +807,20 @@ const addConfigMoreMenu = async (config: ISearchOption, edit: Protyle, element: if (item.layout === 0) { element.querySelector(".search__layout").classList.remove("search__layout--row"); if (data.row) { - edit.protyle.element.classList.remove("fn__flex-1") - edit.protyle.element.style.height = data.row - edit.protyle.element.style.width = "" + edit.protyle.element.classList.remove("fn__flex-1"); + edit.protyle.element.style.height = data.row; + edit.protyle.element.style.width = ""; } else { - edit.protyle.element.classList.add("fn__flex-1") + edit.protyle.element.classList.add("fn__flex-1"); } } else { element.querySelector(".search__layout").classList.add("search__layout--row"); if (data.col) { - edit.protyle.element.style.width = data.col - edit.protyle.element.classList.remove("fn__flex-1") - edit.protyle.element.style.height = "" + edit.protyle.element.style.width = data.col; + edit.protyle.element.classList.remove("fn__flex-1"); + edit.protyle.element.style.height = ""; } else { - edit.protyle.element.classList.add("fn__flex-1") + edit.protyle.element.classList.add("fn__flex-1"); } } setPadding(edit.protyle); diff --git a/app/src/util/history.ts b/app/src/util/history.ts index e0a90b950..6081350da 100644 --- a/app/src/util/history.ts +++ b/app/src/util/history.ts @@ -110,14 +110,14 @@ const renderRepoItem = (response: IWebSocketData, element: Element, type: string