zhongrj
2023-10-27 650b5cc41c0697ea2f6e61880cb40ced0d63abb6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<template>
        <view class="menu-box" @click="curMenuClick(curMenu)">
            <view>
                <u--image :src="curMenu.imgUrl" :width='curMenu.imgWidth || 54' :height='curMenu.height || 54' shape="circle"></u--image>
            </view>
            <view :style="{height: curMenu.height || '56rpx'}">
                {{curMenu.title}}
            </view>
        </view>
</template>
 
<script>
    export default {
        props: {
            curMenu: {
                type: Object,
                default: () => {
                    return {}
                }
            }
        },
        
        methods: {
            curMenuClick(e) {
                console.log('当前点击处')
                
                if (e.event) {
                    e.event(e)
                }
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    .menu-box {
        display: flex;
        flex-direction: column;
        font-size: 28rpx;
        
        & > view {
            display: flex;
            justify-content: center;
            align-items: center;
        }
        
        & > view:first-child {
            flex: 1;
        }
    }
    
</style>