| | |
| | | <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> |
| | |
| | | navs:[ |
| | | { |
| | | text:'入库', |
| | | icon:'download' , |
| | | icon:'download', |
| | | clicked:'' |
| | | }, |
| | | { |
| | | text:'出库', |
| | | icon:'upload' , |
| | | icon:'upload', |
| | | clicked:'' |
| | | }, |
| | | { |
| | | text:'盘点', |
| | | icon:'compose' , |
| | | icon:'compose', |
| | | clicked:'' |
| | | }, |
| | | { |
| | | text:'退出登录', |
| | | icon:'close' , |
| | | icon:'close', |
| | | clicked:'' |
| | | }, |
| | | ] |
| | | ], |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | click(index) { |
| | | this.navs[index].clicked = 'grey' |
| | | setTimeout(()=>{ |
| | | this.navs[index].clicked = '' |
| | | },100) |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | margin-bottom: 20%; |
| | | text-align: center; |
| | | } |
| | | .grey { |
| | | background-color: #dcdcdc; |
| | | } |
| | | </style> |