首页/我的

This commit is contained in:
kk
2026-04-29 16:51:52 +08:00
parent cabaa14dd0
commit 8a4cba7769
6 changed files with 587 additions and 160 deletions
@@ -0,0 +1,69 @@
<template>
<view class="float-menu-card">
<view
v-for="(item, index) in list"
:key="index"
class="menu-item"
:class="{ 'last-item': index === list.length - 1 }"
@click="handleItemClick(item, index)"
>
<text class="menu-text">{{ item.title }}</text>
<text class="arrow">></text>
</view>
</view>
</template>
<script>
export default {
name: 'FloatMenuCard',
props: {
list: {
type: Array,
default: () => []
}
},
methods: {
handleItemClick(item, index) {
// 发出事件,让父组件处理跳转逻辑
this.$emit('item-click', { item, index });
}
}
}
</script>
<style scoped>
.float-menu-card {
position: fixed;
bottom: 40rpx;
left: 28rpx;
right: 28rpx;
background: #fff;
border-radius: 16rpx;
box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.1);
overflow: hidden;
z-index: 100;
}
.menu-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 32rpx 28rpx;
border-bottom: 1rpx solid #f5f5f5;
}
.menu-item:last-child,
.menu-item.last-item {
border-bottom: none;
}
.menu-text {
font-size: 30rpx;
color: #333;
}
.arrow {
font-size: 28rpx;
color: #ccc;
}
</style>