|
|
@@ -15,7 +15,6 @@
|
|
|
<view class="hb-popup-content">
|
|
|
<view class="popup-header">
|
|
|
<text>红包</text>
|
|
|
- <text class="close-btn" @click="closePopup">×</text>
|
|
|
</view>
|
|
|
|
|
|
<scroll-view scroll-y class="popup-scroll">
|
|
|
@@ -54,9 +53,10 @@
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
|
|
|
- <view class="popup-footer">
|
|
|
- <button class="confirm-btn" @click="confirmSelection">确定</button>
|
|
|
- </view>
|
|
|
+ <view class="popup-footer">
|
|
|
+ <button class="cancel-btn" @click="cancelSelection">取消</button>
|
|
|
+ <button class="confirm-btn" @click="confirmSelection">确定</button>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
</view>
|
|
|
@@ -121,12 +121,15 @@ export default {
|
|
|
selectHb(item) {
|
|
|
this.currentSelectedId = item ? item.id : null;
|
|
|
},
|
|
|
- confirmSelection() {
|
|
|
- this.$emit('input', this.currentSelectedId); // Update v-model
|
|
|
+ confirmSelection() {
|
|
|
+ this.$emit('input', this.currentSelectedId); // Update v-model
|
|
|
const selectedItem = this.hbData.find(item => item.id == this.currentSelectedId);
|
|
|
- this.$emit('change', selectedItem || null);
|
|
|
- this.closePopup();
|
|
|
- },
|
|
|
+ this.$emit('change', selectedItem || null);
|
|
|
+ this.closePopup();
|
|
|
+ },
|
|
|
+ cancelSelection() {
|
|
|
+ this.closePopup();
|
|
|
+ },
|
|
|
formatTime(timestamp) {
|
|
|
if (!timestamp) return '';
|
|
|
let date;
|
|
|
@@ -192,11 +195,11 @@ export default {
|
|
|
flex-direction: column;
|
|
|
width: 78vw;
|
|
|
max-width: 340upx;
|
|
|
- max-height: 90vh;
|
|
|
+ height: 99vh;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.popup-header {
|
|
|
- height: 70upx;
|
|
|
+ height: 40upx;
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
@@ -206,13 +209,6 @@ export default {
|
|
|
font-weight: 600;
|
|
|
border-radius: 12upx 12upx 0 0;
|
|
|
}
|
|
|
-.close-btn {
|
|
|
- position: absolute;
|
|
|
- right: 1upx;
|
|
|
- font-size: 28upx;
|
|
|
- color: #999;
|
|
|
- padding: 4upx;
|
|
|
-}
|
|
|
.popup-scroll {
|
|
|
flex: 1;
|
|
|
height: 0; /* Important for flex child scroll */
|
|
|
@@ -220,7 +216,7 @@ export default {
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.hb-list {
|
|
|
- padding: 6upx;
|
|
|
+ padding:0 6upx;
|
|
|
}
|
|
|
.hb-card {
|
|
|
background-color: #fff6f0; /* Light orange bg */
|
|
|
@@ -305,13 +301,25 @@ export default {
|
|
|
.popup-footer {
|
|
|
padding: 10upx 14upx;
|
|
|
background-color: #fff;
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
+.cancel-btn {
|
|
|
+ flex: 1;
|
|
|
+ background-color: #e0e0e0;
|
|
|
+ color: #666;
|
|
|
+ border-radius: 20upx;
|
|
|
+ font-size: 22upx;
|
|
|
+ height: 35upx;
|
|
|
+ line-height: 35upx;
|
|
|
+ margin-right: 10upx;
|
|
|
}
|
|
|
.confirm-btn {
|
|
|
- background-color: #ff6600;
|
|
|
+ flex: 1;
|
|
|
+ background-color: #09C567;
|
|
|
color: #fff;
|
|
|
border-radius: 20upx;
|
|
|
font-size: 22upx;
|
|
|
- height: 60upx;
|
|
|
- line-height: 60upx;
|
|
|
+ height: 35upx;
|
|
|
+ line-height: 35upx;
|
|
|
}
|
|
|
</style>
|