From 17e52cc49cb95d8d7edfa227d25d086131455b53 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 20 Jan 2024 23:05:01 +0800 Subject: [PATCH] :rotating_light: --- app/src/card/openCard.ts | 4 ++-- app/src/protyle/render/av/blockAttr.ts | 8 ++++---- app/src/protyle/render/av/render.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/card/openCard.ts b/app/src/card/openCard.ts index 9a30a7231..7f637acfc 100644 --- a/app/src/card/openCard.ts +++ b/app/src/card/openCard.ts @@ -459,7 +459,7 @@ export const openCardByData = async (app: App, cardsData: ICardData, cardType: T } let lastRange: Range; if (getSelection().rangeCount > 0) { - lastRange = getSelection().getRangeAt(0) + lastRange = getSelection().getRangeAt(0); } const dialog = new Dialog({ positionId: Constants.DIALOG_OPENCARD, @@ -474,7 +474,7 @@ export const openCardByData = async (app: App, cardsData: ICardData, cardType: T } } if (lastRange) { - focusByRange(lastRange) + focusByRange(lastRange); } } }); diff --git a/app/src/protyle/render/av/blockAttr.ts b/app/src/protyle/render/av/blockAttr.ts index a720be4d3..5f51628d4 100644 --- a/app/src/protyle/render/av/blockAttr.ts +++ b/app/src/protyle/render/av/blockAttr.ts @@ -186,7 +186,7 @@ class="fn__flex-1 fn__flex${["url", "text", "number", "email", "phone"].includes dragBlockElement = hasClosestBlock(window.siyuan.dragElement) as HTMLElement; const ghostElement = document.createElement("div"); - ghostElement.className = "block__icons" + ghostElement.className = "block__icons"; ghostElement.innerHTML = target.nextElementSibling.outerHTML; ghostElement.setAttribute("style", "width: 160px;position:fixed;opacity:.1;"); document.body.append(ghostElement); @@ -197,7 +197,7 @@ class="fn__flex-1 fn__flex${["url", "text", "number", "email", "phone"].includes }); element.addEventListener("drop", () => { window.siyuan.dragElement.style.opacity = ""; - const targetElement = element.querySelector(".dragover__bottom, .dragover__top") as HTMLElement + const targetElement = element.querySelector(".dragover__bottom, .dragover__top") as HTMLElement; if (targetElement && dragBlockElement) { const isBottom = targetElement.classList.contains("dragover__bottom"); transaction(protyle, [{ @@ -212,9 +212,9 @@ class="fn__flex-1 fn__flex${["url", "text", "number", "email", "phone"].includes id }]); if (isBottom) { - targetElement.after(window.siyuan.dragElement) + targetElement.after(window.siyuan.dragElement); } else { - targetElement.before(window.siyuan.dragElement) + targetElement.before(window.siyuan.dragElement); } targetElement.classList.remove("dragover__bottom", "dragover__top"); } diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts index 4938f3ee0..1e8331251 100644 --- a/app/src/protyle/render/av/render.ts +++ b/app/src/protyle/render/av/render.ts @@ -69,7 +69,7 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void, v } // header let tableHTML = '
'; - let calcHTML = ''; + let calcHTML = ""; let pinIndex = -1; let pinMaxIndex = -1; let indexWidth = 0; @@ -297,7 +297,7 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => { openMenuPanel({protyle, blockElement: item, type: "edit", colId: operation.id}); } if (["updateAttrViewColRollup","updateAttrViewColTemplate", "updateAttrViewCell", "addAttrViewCol"].includes(operation.action)) { - const attrElement = document.querySelector(`.b3-dialog--open[data-key="${Constants.DIALOG_ATTR}"] div[data-av-id="${operation.avID}"]`) as HTMLElement + const attrElement = document.querySelector(`.b3-dialog--open[data-key="${Constants.DIALOG_ATTR}"] div[data-av-id="${operation.avID}"]`) as HTMLElement; if (attrElement) { // 更新属性面板 renderAVAttribute(attrElement.parentElement, attrElement.dataset.nodeId, protyle);