| | |
| | | <template> |
| | | <view> |
| | | <view class="home-nav"> |
| | | <view class="home-nav-item" v-for="(item,index) in navs" @click="click(index)" :class="item.clicked"> |
| | | <view class="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"></uni-icons> |
| | | <uni-icons :type="item.icon" size="60" color="#6c6c6c"></uni-icons> |
| | | </view> |
| | | <view class="nav-text"> |
| | | {{item.text}} |
| | |
| | | }, |
| | | methods: { |
| | | click(index) { |
| | | |
| | | }, |
| | | touch(index) { |
| | | this.navs[index].clicked = 'grey' |
| | | setTimeout(()=>{ |
| | | this.navs[index].clicked = '' |
| | | },100) |
| | | |
| | | |
| | | // setTimeout(()=>{ |
| | | |
| | | // },100) |
| | | }, |
| | | touchend(index) { |
| | | this.navs[index].clicked = '' |
| | | } |
| | | } |
| | | } |