feat: 弹窗展示优化

This commit is contained in:
2026-08-06 16:27:23 +08:00
parent 63d699ca7b
commit 5f6358cb07
4 changed files with 122 additions and 17 deletions
+51 -6
View File
@@ -1,5 +1,5 @@
<template>
<uni-popup ref="popupRef" :type="popupType" background-color="#fff">
<uni-popup ref="popupRef" :type="popupType" background-color="transparent">
<view class="shipment-popup" :class="`shipment-popup--${popupType}`" @tap.stop>
<view class="shipment-popup__header">
<view>
@@ -605,18 +605,23 @@ defineExpose({
.shipment-popup {
background: #ffffff;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
.shipment-popup--bottom {
width: 100%;
max-height: 82vh;
border-radius: 24rpx 24rpx 0 0;
padding: 32rpx 24rpx calc(24rpx + env(safe-area-inset-bottom));
padding: 32rpx 24rpx calc(48rpx + env(safe-area-inset-bottom));
overflow: hidden;
}
.shipment-popup--center {
width: 680rpx;
max-height: 78vh;
max-height: 82vh;
border-radius: 24rpx;
padding: 32rpx 24rpx;
padding: 32rpx 24rpx 40rpx 24rpx;
overflow: hidden;
}
@@ -625,6 +630,7 @@ defineExpose({
align-items: center;
justify-content: space-between;
margin-bottom: 12rpx;
flex-shrink: 0;
}
.shipment-popup__title {
@@ -657,16 +663,21 @@ defineExpose({
text-align: center;
font-size: 36rpx;
color: #666666;
flex-shrink: 0;
}
.shipment-popup__desc {
font-size: 24rpx;
color: #999999;
margin-bottom: 24rpx;
flex-shrink: 0;
}
.shipment-popup__content {
max-height: 720rpx;
flex: 1;
min-height: 0;
max-height: calc(82vh - 360rpx - env(safe-area-inset-bottom));
box-sizing: border-box;
}
.shipment-popup__item {
@@ -730,7 +741,17 @@ defineExpose({
display: flex;
align-items: center;
gap: 20rpx;
margin-top: 32rpx;
margin-top: 24rpx;
flex-shrink: 0;
position: sticky;
bottom: 0;
left: 0;
right: 0;
z-index: 20;
background: #ffffff;
padding-top: 16rpx;
padding-bottom: env(safe-area-inset-bottom);
box-shadow: 0 -8rpx 20rpx -10rpx rgba(0, 0, 0, 0.06);
}
.shipment-popup__btn {
@@ -759,4 +780,28 @@ defineExpose({
font-size: 26rpx;
color: #999999;
}
::v-deep .uni-popup {
background: transparent !important;
}
::v-deep .uni-popup__wrapper {
background: transparent !important;
}
::v-deep .uni-popup__wrapper-box {
background: transparent !important;
}
::v-deep .uni-popup__content {
background: transparent !important;
}
.shipment-popup--bottom ::v-deep .uni-popup__content,
.shipment-popup--bottom ::v-deep .uni-popup__wrapper-box {
border-radius: 24rpx 24rpx 0 0 !important;
overflow: hidden !important;
}
.shipment-popup--center ::v-deep .uni-popup__content,
.shipment-popup--center ::v-deep .uni-popup__wrapper-box {
border-radius: 24rpx !important;
overflow: hidden !important;
background: transparent !important;
}
</style>