pang.jiabao
2025-04-14 bad10e1f9e91992e5b8f9bed7892dca4c2db7181
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<template>
    <view>
        <view class="two-cols home-nav-item" v-for="(item,index) in navs" @click="click(index)" :class="item.clicked" 
        @touchstart="touch(index)" @touchend="touchend(index)">
            <view class="nav-icon">
                <uni-icons :type="item.icon" size="60" color="#6c6c6c"></uni-icons>
            </view>
            <view class="nav-text">
                {{item.name}}
            </view>
        </view>
    </view>
</template>
 
<script>
    export default{
        data() {
            return {
                navs:[
                    {
                        name:'入库',
                        icon:'download',
                        clicked:''
                    },
                    {
                        name:'出库',
                        icon:'upload',
                        clicked:''
                    },
                    {
                        name:'盘点',
                        icon:'compose',
                        clicked:''
                    },
                    {
                        name:'Выход из системы',
                        icon:'close',
                        clicked:''
                    },
                    ],
                
            }
        },
        methods: {
            click(index) {
                
            },
            touch(index) {
                this.navs[index].clicked = 'grey'
                // setTimeout(()=>{
                    
                // },100)
            },
            touchend(index) {
                this.navs[index].clicked = ''
            }
        }
    }
</script>
 
<style>
    @import url("@/static/css/common.css");
    .home-nav-item {
        width: 44%;
        height: 0;
        padding-bottom: 50%;
        margin-left: 4%;
        margin-top: 5%;
        display: inline-block;
        box-shadow:  0 0 2px #dcdcdc;
        /* border: 1px solid #dcdcdc;
        border-right: 1px solid #dcdcdc;
        border-left: 1px solid #dcdcdc; */
    }
    .home-nav-item:first-child {
        
    }
    .nav-icon {
        width: 60%;
        height: 0;
        padding-bottom: 60%;
        margin: 10% auto;
        text-align: center;
    }
    .nav-text {
        width: 100%;
        height: 0;
        margin-bottom: 20%;
        font-size: 32rpx;
        text-align: center;
    }
    .grey {
        background-color: #dcdcdc;
    }
</style>