#
Your Name
2022-08-17 ecbb13047dbf7918d61e60ff264125ba71cb3840
#
1个文件已修改
20 ■■■■ 已修改文件
pages/demo/index.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/demo/index.vue
@@ -1,14 +1,13 @@
<template>
    <view>
        <view class="home-nav">
            <view class="home-nav-item" v-for="(item,index) in navs">
            <view class="home-nav-item" v-for="(item,index) in navs" @click="click(index)" :class="item.clicked">
                <view class="nav-icon">
                    <uni-icons :type="item.icon" size="60"></uni-icons>
                </view>
                <view class="nav-text">
                    {{item.text}}
                </view>
            </view>
        </view>
    </view>
@@ -22,24 +21,36 @@
                    {
                        text:'入库',
                        icon:'download'    ,
                        clicked:''
                    },
                    {
                        text:'出库',
                        icon:'upload'    ,
                        clicked:''
                    },
                    {
                        text:'盘点',
                        icon:'compose'    ,
                        clicked:''
                    },
                    {
                        text:'退出登录',
                        icon:'close'    ,
                        clicked:''
                    },
                    ]
                    ],
            }
        },
        methods: {
            click(index) {
                this.navs[index].clicked = 'grey'
                setTimeout(()=>{
                    this.navs[index].clicked = ''
                },100)
            
            }
        }
    }
</script>
@@ -73,4 +84,7 @@
        margin-bottom: 20%;
        text-align: center;
    }
    .grey {
        background-color: #dcdcdc;
    }
</style>