feat: 弹窗展示优化
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
class="ai-button3 w_144 m-r-10"
|
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')"
|
@tap.stop="emit('now')"
|
||||||
>
|
>
|
||||||
立即发货
|
立即发货
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<uni-popup ref="popupRef" type="bottom" background-color="#fff">
|
<uni-popup ref="popupRef" :type="popupType" background-color="transparent">
|
||||||
<view class="receive-popup" @tap.stop>
|
<view class="receive-popup" :class="`receive-popup--${popupType}`" @tap.stop>
|
||||||
<view class="receive-popup__header">
|
<view class="receive-popup__header">
|
||||||
<view>
|
<view>
|
||||||
<view class="receive-popup__title">确认收货</view>
|
<view class="receive-popup__title">确认收货</view>
|
||||||
@@ -70,6 +70,10 @@
|
|||||||
import { computed, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
popupType: {
|
||||||
|
type: String,
|
||||||
|
default: 'bottom',
|
||||||
|
},
|
||||||
orderNo: {
|
orderNo: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
@@ -393,14 +397,33 @@ defineExpose({ open, close });
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.receive-popup {
|
.receive-popup {
|
||||||
width: 100%;
|
|
||||||
max-height: 80vh;
|
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-radius: 24rpx 24rpx 0 0;
|
box-sizing: border-box;
|
||||||
padding: 32rpx 32rpx 0 32rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
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 {
|
&__header {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -439,7 +462,8 @@ defineExpose({ open, close });
|
|||||||
}
|
}
|
||||||
&__content {
|
&__content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
max-height: 56vh;
|
min-height: 0;
|
||||||
|
max-height: calc(82vh - 420rpx - env(safe-area-inset-bottom));
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
@@ -534,13 +558,22 @@ defineExpose({ open, close });
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
&__actions {
|
&__actions {
|
||||||
padding: 20rpx 0 32rpx 0;
|
padding: 16rpx 0 0 0;
|
||||||
background: #ffffff;
|
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 {
|
&__select-all {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 8rpx 0 20rpx 0;
|
padding: 8rpx 0 16rpx 0;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
&__select-all-text {
|
&__select-all-text {
|
||||||
margin-left: 12rpx;
|
margin-left: 12rpx;
|
||||||
@@ -553,6 +586,8 @@ defineExpose({ open, close });
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
gap: 20rpx;
|
gap: 20rpx;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
&__btn {
|
&__btn {
|
||||||
min-width: 180rpx;
|
min-width: 180rpx;
|
||||||
@@ -577,4 +612,28 @@ defineExpose({ open, close });
|
|||||||
opacity: 0.6;
|
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>
|
</style>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<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" :class="`shipment-popup--${popupType}`" @tap.stop>
|
||||||
<view class="shipment-popup__header">
|
<view class="shipment-popup__header">
|
||||||
<view>
|
<view>
|
||||||
@@ -605,18 +605,23 @@ defineExpose({
|
|||||||
.shipment-popup {
|
.shipment-popup {
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shipment-popup--bottom {
|
.shipment-popup--bottom {
|
||||||
|
width: 100%;
|
||||||
|
max-height: 82vh;
|
||||||
border-radius: 24rpx 24rpx 0 0;
|
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 {
|
.shipment-popup--center {
|
||||||
width: 680rpx;
|
width: 680rpx;
|
||||||
max-height: 78vh;
|
max-height: 82vh;
|
||||||
border-radius: 24rpx;
|
border-radius: 24rpx;
|
||||||
padding: 32rpx 24rpx;
|
padding: 32rpx 24rpx 40rpx 24rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -625,6 +630,7 @@ defineExpose({
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 12rpx;
|
margin-bottom: 12rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shipment-popup__title {
|
.shipment-popup__title {
|
||||||
@@ -657,16 +663,21 @@ defineExpose({
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shipment-popup__desc {
|
.shipment-popup__desc {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
margin-bottom: 24rpx;
|
margin-bottom: 24rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shipment-popup__content {
|
.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 {
|
.shipment-popup__item {
|
||||||
@@ -730,7 +741,17 @@ defineExpose({
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 20rpx;
|
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 {
|
.shipment-popup__btn {
|
||||||
@@ -759,4 +780,28 @@ defineExpose({
|
|||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #999999;
|
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>
|
</style>
|
||||||
|
|||||||
@@ -149,6 +149,7 @@
|
|||||||
/>
|
/>
|
||||||
<ReceiveItemPopup
|
<ReceiveItemPopup
|
||||||
ref="receiveItemPopupRef"
|
ref="receiveItemPopupRef"
|
||||||
|
popup-type="center"
|
||||||
:order-no="state.orderInfo.no || ''"
|
:order-no="state.orderInfo.no || ''"
|
||||||
:order-data="state.orderInfo"
|
:order-data="state.orderInfo"
|
||||||
:delay-records="state.delayRecords"
|
:delay-records="state.delayRecords"
|
||||||
|
|||||||
Reference in New Issue
Block a user