- 新增多个功能图标(箭头、盾牌、位置等) - 优化全局按钮、标签、输入框等组件样式 - 修复导航栏高度计算逻辑,适配微信小程序 - 优化消息页、订单页、个人中心等页面布局 - 修复微信支付配置及通知接口问题
142 行
2.9 KiB
Vue
142 行
2.9 KiB
Vue
<template>
|
||
<view class="drawer-mask" v-if="visible" @tap="close">
|
||
<view class="drawer-sheet" @tap.stop>
|
||
<!-- 1:1 复刻 frame_012:从相册中选择 / 从商品图库中选择 / 从系统图库中选择(系统默认图片) / 拍照 / 取消 -->
|
||
<view class="sheet-menu">
|
||
<view class="menu-item clickable-hover" @tap="chooseAction('album')">
|
||
<text class="menu-txt">从相册中选择</text>
|
||
</view>
|
||
<view class="menu-item clickable-hover" @tap="chooseAction('goods_default')">
|
||
<text class="menu-txt">从商品图库中选择</text>
|
||
</view>
|
||
<view class="menu-item clickable-hover" @tap="chooseAction('system_default')">
|
||
<text class="menu-txt">从系统图库中选择</text>
|
||
<view class="sys-badge">
|
||
<text class="sb-txt">系统默认图片</text>
|
||
</view>
|
||
</view>
|
||
<view class="menu-item clickable-hover" @tap="chooseAction('camera')">
|
||
<text class="menu-txt">拍照</text>
|
||
</view>
|
||
</view>
|
||
<view class="sheet-divider"></view>
|
||
<view class="menu-cancel clickable-hover" @tap="close">
|
||
<text class="cancel-txt">取消</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script setup>
|
||
defineProps({
|
||
visible: { type: Boolean, default: false }
|
||
});
|
||
|
||
const emit = defineEmits(['update:visible', 'select']);
|
||
|
||
function chooseAction(type) {
|
||
emit('select', type);
|
||
close();
|
||
}
|
||
|
||
function close() {
|
||
emit('update:visible', false);
|
||
}
|
||
</script>
|
||
|
||
<style scoped>
|
||
.drawer-mask {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
background: rgba(0, 0, 0, 0.55);
|
||
z-index: 999;
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: flex-end;
|
||
animation: fadeIn 0.2s ease-out;
|
||
}
|
||
|
||
@keyframes fadeIn {
|
||
from { opacity: 0; }
|
||
to { opacity: 1; }
|
||
}
|
||
|
||
.drawer-sheet {
|
||
background: #FFFFFF;
|
||
border-top-left-radius: 24rpx;
|
||
border-top-right-radius: 24rpx;
|
||
padding-bottom: env(safe-area-inset-bottom);
|
||
overflow: hidden;
|
||
animation: slideUp 0.24s cubic-bezier(0.2, 0.9, 0.3, 1);
|
||
}
|
||
|
||
@keyframes slideUp {
|
||
from { transform: translateY(100%); }
|
||
to { transform: translateY(0); }
|
||
}
|
||
|
||
.sheet-menu {
|
||
background: #FFFFFF;
|
||
}
|
||
|
||
.menu-item {
|
||
height: 112rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
border-bottom: 1rpx solid #F0F0F2;
|
||
position: relative;
|
||
}
|
||
|
||
.menu-item:last-child {
|
||
border-bottom: none;
|
||
}
|
||
|
||
.menu-txt {
|
||
font-size: 32rpx;
|
||
color: #1F1F1F;
|
||
}
|
||
|
||
.sys-badge {
|
||
margin-left: 12rpx;
|
||
height: 44rpx;
|
||
padding: 0 18rpx;
|
||
border-radius: 22rpx;
|
||
background: #F44336;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.sb-txt {
|
||
font-size: 24rpx;
|
||
color: #FFFFFF;
|
||
line-height: 1;
|
||
}
|
||
|
||
.sheet-divider {
|
||
height: 16rpx;
|
||
background: #F5F6F8;
|
||
}
|
||
|
||
.menu-cancel {
|
||
background: #FFFFFF;
|
||
height: 110rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.cancel-txt {
|
||
font-size: 32rpx;
|
||
color: #1F1F1F;
|
||
}
|
||
|
||
.clickable-hover:active {
|
||
background: #F9FAFB;
|
||
}
|
||
</style>
|