From 351165603e995f44c3206decc79aa4817a2611c8 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, 6 Oct 2022 02:28:22 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(layer):=20=E4=BF=AE=E5=A4=8D=20con?= =?UTF-8?q?tent-height=20=E8=AE=A1=E7=AE=97=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/document-layer/src/document/zh-CN/demo.md | 4 ++-- package/layer/src/utils/index.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package/document-layer/src/document/zh-CN/demo.md b/package/document-layer/src/document/zh-CN/demo.md index 9761a3a6..38120d14 100644 --- a/package/document-layer/src/document/zh-CN/demo.md +++ b/package/document-layer/src/document/zh-CN/demo.md @@ -16,11 +16,11 @@ import { layer } from "../../../../layer/src/index" const msg = function() { - layer.msg("普通消息", { time: 1000 }) + layer.msg("普通消息", { time: 199999000 }) } const success = function() { - layer.msg("成功消息", { time: 1000, icon: 1}) + layer.msg("成功消息", { time: 199999000, icon: 1}) } const failure = function() { diff --git a/package/layer/src/utils/index.ts b/package/layer/src/utils/index.ts index 53c27cfe..9e94a7f3 100644 --- a/package/layer/src/utils/index.ts +++ b/package/layer/src/utils/index.ts @@ -167,9 +167,9 @@ export function calculateContent( } else { if (type == 0) { if (title) { - return isMessage ? height : "calc(" + height + " - 137px)"; + return isMessage ? '' : "calc(" + height + " - 137px)"; } else { - return isMessage ? height : "calc(" + height + " - 86px)"; + return isMessage ? '' : "calc(" + height + " - 86px)"; } } if (type == 1 || type == 4) {