🐛(layer): 修复 content-height 计算错误

This commit is contained in:
就眠儀式 2022-10-06 02:28:22 +08:00
parent 21e33e8efe
commit 351165603e
2 changed files with 4 additions and 4 deletions

View File

@ -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() {

View File

@ -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) {