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
+1 -1
View File
@@ -9,7 +9,7 @@
</view>
<view
class="ai-button3 w_144 m-r-10"
v-if="(props.status === 50 || props.status === 15 || props.hasDelayedItems) && !props.disableDelayShipment"
v-if="(props.status === 50 || props.hasDelayedItems) && !props.disableDelayShipment"
@tap.stop="emit('now')"
>
立即发货
+69 -10
View File
@@ -1,6 +1,6 @@
<template>
<uni-popup ref="popupRef" type="bottom" background-color="#fff">
<view class="receive-popup" @tap.stop>
<uni-popup ref="popupRef" :type="popupType" background-color="transparent">
<view class="receive-popup" :class="`receive-popup--${popupType}`" @tap.stop>
<view class="receive-popup__header">
<view>
<view class="receive-popup__title">确认收货</view>
@@ -70,6 +70,10 @@
import { computed, ref, watch } from 'vue';
const props = defineProps({
popupType: {
type: String,
default: 'bottom',
},
orderNo: {
type: String,
default: '',
@@ -393,14 +397,33 @@ defineExpose({ open, close });
<style lang="scss" scoped>
.receive-popup {
width: 100%;
max-height: 80vh;
background: #ffffff;
border-radius: 24rpx 24rpx 0 0;
padding: 32rpx 32rpx 0 32rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
box-sizing: border-box;
&--bottom {
width: 100%;
max-height: 82vh;
border-radius: 24rpx 24rpx 0 0;
padding: 32rpx 32rpx calc(24rpx + env(safe-area-inset-bottom)) 32rpx;
overflow: hidden;
}
&--center {
width: 680rpx;
max-height: 78vh;
border-radius: 24rpx;
padding: 32rpx 32rpx 0 32rpx;
margin: 0 auto;
overflow: hidden;
}
&--center &__content {
max-height: 52vh;
}
&--center &__btn {
min-width: 160rpx;
}
&__header {
display: flex;
@@ -439,7 +462,8 @@ defineExpose({ open, close });
}
&__content {
flex: 1;
max-height: 56vh;
min-height: 0;
max-height: calc(82vh - 420rpx - env(safe-area-inset-bottom));
margin-top: 20rpx;
box-sizing: border-box;
}
@@ -534,13 +558,22 @@ defineExpose({ open, close });
font-weight: 500;
}
&__actions {
padding: 20rpx 0 32rpx 0;
padding: 16rpx 0 0 0;
background: #ffffff;
position: sticky;
bottom: 0;
left: 0;
right: 0;
z-index: 20;
box-shadow: 0 -8rpx 20rpx -10rpx rgba(0, 0, 0, 0.06);
padding-bottom: env(safe-area-inset-bottom);
margin-top: 20rpx;
}
&__select-all {
display: flex;
align-items: center;
padding: 8rpx 0 20rpx 0;
padding: 8rpx 0 16rpx 0;
flex-shrink: 0;
}
&__select-all-text {
margin-left: 12rpx;
@@ -553,6 +586,8 @@ defineExpose({ open, close });
align-items: center;
justify-content: flex-end;
gap: 20rpx;
padding-bottom: 20rpx;
flex-shrink: 0;
}
&__btn {
min-width: 180rpx;
@@ -577,4 +612,28 @@ defineExpose({ open, close });
opacity: 0.6;
}
}
::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;
}
.receive-popup--bottom ::v-deep .uni-popup__content,
.receive-popup--bottom ::v-deep .uni-popup__wrapper-box {
border-radius: 24rpx 24rpx 0 0 !important;
overflow: hidden !important;
}
.receive-popup--center ::v-deep .uni-popup__content,
.receive-popup--center ::v-deep .uni-popup__wrapper-box {
border-radius: 24rpx !important;
overflow: hidden !important;
background: transparent !important;
}
</style>
+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>