- 新增epay v2、v3、v3new版本的支付类库及证书文件 - 新增cos云存储类库文件 - 调整文件上传保存格式为按分类存储 - 修复会员、规则、类目等语言翻译键名 - 新增小程序图标等静态资源文件
112 行
2.1 KiB
Vue
112 行
2.1 KiB
Vue
<template>
|
|
<view class="drawer-mask" v-if="visible" @tap="close">
|
|
<view class="drawer-sheet" @tap.stop>
|
|
<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('camera')">
|
|
<text class="menu-txt">拍照</text>
|
|
</view>
|
|
</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: transparent;
|
|
padding: 0 24rpx calc(24rpx + env(safe-area-inset-bottom));
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16rpx;
|
|
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;
|
|
border-radius: 24rpx;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.menu-item {
|
|
height: 110rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-bottom: 1rpx solid #F3F4F6;
|
|
}
|
|
|
|
.menu-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.menu-txt {
|
|
font-size: 32rpx;
|
|
color: #1F2937;
|
|
}
|
|
|
|
.menu-cancel {
|
|
background: #FFFFFF;
|
|
border-radius: 24rpx;
|
|
height: 104rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.cancel-txt {
|
|
font-size: 32rpx;
|
|
color: #6B7280;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.clickable-hover:active {
|
|
opacity: 0.85;
|
|
}
|
|
</style>
|