From ecbb13047dbf7918d61e60ff264125ba71cb3840 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: 星期三, 17 八月 2022 23:20:24 +0800
Subject: [PATCH] #

---
 pages/demo/index.vue |   30 ++++++++++++++++++++++--------
 1 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/pages/demo/index.vue b/pages/demo/index.vue
index d96117d..c044822 100644
--- a/pages/demo/index.vue
+++ b/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>
@@ -21,25 +20,37 @@
 				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>
@@ -73,4 +84,7 @@
 		margin-bottom: 20%;
 		text-align: center;
 	}
+	.grey {
+		background-color: #dcdcdc;
+	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.1