From 035f98facdf0036ee06d0f1bac43e4ea2b889e95 Mon Sep 17 00:00:00 2001 From: Your Name <you@example.com> Date: 星期三, 17 八月 2022 23:39:39 +0800 Subject: [PATCH] # --- pages/demo/index.vue | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/pages/demo/index.vue b/pages/demo/index.vue index c044822..51cf379 100644 --- a/pages/demo/index.vue +++ b/pages/demo/index.vue @@ -1,9 +1,9 @@ <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}} @@ -44,12 +44,16 @@ }, methods: { click(index) { + + }, + touch(index) { this.navs[index].clicked = 'grey' - setTimeout(()=>{ - this.navs[index].clicked = '' - },100) - - + // setTimeout(()=>{ + + // },100) + }, + touchend(index) { + this.navs[index].clicked = '' } } } -- Gitblit v1.9.1