diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts index 49cf08ce7..03f2b3f28 100644 --- a/app/src/protyle/util/onGet.ts +++ b/app/src/protyle/util/onGet.ts @@ -99,7 +99,7 @@ const setHTML = (options: { content: string, action?: string[] }, protyle: IProt return; } protyle.block.showAll = options.action.includes(Constants.CB_GET_ALL); - const REMOVED_OVER_HEIGHT = protyle.contentElement.clientHeight * 8 + const REMOVED_OVER_HEIGHT = protyle.contentElement.clientHeight * 8; if (options.action.includes(Constants.CB_GET_APPEND)) { // 动态加载移除 if (protyle.contentElement.scrollHeight > REMOVED_OVER_HEIGHT) { diff --git a/app/src/search/index.ts b/app/src/search/index.ts index 7912fd237..4c038df9f 100644 --- a/app/src/search/index.ts +++ b/app/src/search/index.ts @@ -77,7 +77,7 @@ export class Search extends Model { searchPanelElement.scrollTop > currentList.offsetTop) { searchPanelElement.scrollTop = currentList.offsetTop - searchPanelElement.clientHeight + lineHeight; } - this.getArticle(currentList.getAttribute("data-node-id"), inputElement.value) + this.getArticle(currentList.getAttribute("data-node-id"), inputElement.value); event.preventDefault(); } else if (event.key === "ArrowUp") { currentList.classList.remove("b3-list-item--focus"); diff --git a/app/src/util/onGetConfig.ts b/app/src/util/onGetConfig.ts index 728713fd3..93e0ed243 100644 --- a/app/src/util/onGetConfig.ts +++ b/app/src/util/onGetConfig.ts @@ -158,9 +158,9 @@ export const onGetConfig = () => { const initStatus = () => { const allDocks = getAllDocks(); - let menuHTML = '' + let menuHTML = ""; allDocks.forEach(item => { - menuHTML += `` + menuHTML += ``; }); document.getElementById("status").innerHTML = `
@@ -183,12 +183,12 @@ const initStatus = () => {
-
` +`; document.querySelector("#status").addEventListener("click", (event) => { - let target = event.target as HTMLElement + let target = event.target as HTMLElement; while (target.id !== "status") { - if (target.id === 'barDock') { - const useElement = target.firstElementChild.firstElementChild + if (target.id === "barDock") { + const useElement = target.firstElementChild.firstElementChild; const dockIsShow = useElement.getAttribute("xlink:href") === "#iconHideDock"; if (dockIsShow) { useElement.setAttribute("xlink:href", "#iconDock"); @@ -226,7 +226,7 @@ const initStatus = () => { event.stopPropagation(); break; } else if (target.classList.contains("b3-menu__item")) { - const type = target.getAttribute("data-type") as TDockType + const type = target.getAttribute("data-type") as TDockType; getDockByType(type).toggleModel(type); if (type === "file" && getSelection().rangeCount > 0) { const range = getSelection().getRangeAt(0); @@ -262,10 +262,10 @@ const initStatus = () => { event.stopPropagation(); break; } - target = target.parentElement + target = target.parentElement; } - }) -} + }); +}; const initBar = () => { document.querySelector(".toolbar").innerHTML = `