From 57dac278258d83f88aa451cb65246f1ee555ddd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E5=84=80=E5=BC=8F?= <854085467@qq.com> Date: Thu, 30 Jun 2022 15:18:43 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(release):=201.2.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/layer/src/utils/index.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/package/layer/src/utils/index.ts b/package/layer/src/utils/index.ts index 58186f22..1294c9c7 100644 --- a/package/layer/src/utils/index.ts +++ b/package/layer/src/utils/index.ts @@ -344,12 +344,14 @@ export function removeNotifiyFromQueen(layerId: string | undefined) { // 间隙 let transOffsetTop = 15; // @ts-ignore 删除项的高度 - let offsetHeight =document.getElementById(layerId)?.firstElementChild?.firstElementChild?.offsetHeight; + let offsetHeight = + document.getElementById(layerId)?.firstElementChild?.firstElementChild + ?.offsetHeight; // @ts-ignore window.NotifiyQueen = window.NotifiyQueen || []; // @ts-ignore let notifiyQueen = window.NotifiyQueen; - let index = notifiyQueen.findIndex((e: { id: string; }) => e.id === layerId) + let index = notifiyQueen.findIndex((e: { id: string }) => e.id === layerId); let offsetType = notifiyQueen[index].offset; let list = notifiyQueen.filter((e: { offset: any }) => { if (e.offset === offsetType) { @@ -364,10 +366,14 @@ export function removeNotifiyFromQueen(layerId: string | undefined) { ?.firstElementChild; if (offsetType === "rt" || offsetType === "lt") { // @ts-ignore - dom.style["top"] = parseFloat(dom.style["top"]) - transOffsetTop - offsetHeight + "px"; + dom.style["top"] = + parseFloat(dom.style["top"]) - transOffsetTop - offsetHeight + "px"; } else { // @ts-ignore - let bottom =parseFloat(dom.style["top"].split(" - ")[1]) - transOffsetTop - offsetHeight; + let bottom = + parseFloat(dom.style["top"].split(" - ")[1]) - + transOffsetTop - + offsetHeight; // @ts-ignore dom.style["top"] = "calc(100vh - " + bottom + "px)"; }