From 6c9cbdf482ce1330704dc635c510ec51a1115a9f Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期一, 18 三月 2024 16:52:29 +0800 Subject: [PATCH] # --- pages/demo/index.vue | 41 +++++++++++++++++++++-------------------- 1 files changed, 21 insertions(+), 20 deletions(-) diff --git a/pages/demo/index.vue b/pages/demo/index.vue index 51cf379..eddec81 100644 --- a/pages/demo/index.vue +++ b/pages/demo/index.vue @@ -1,13 +1,12 @@ <template> <view> - <view class="home-nav"> - <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" color="#6c6c6c"></uni-icons> - </view> - <view class="nav-text"> - {{item.text}} - </view> + <view class="two-cols 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" color="#6c6c6c"></uni-icons> + </view> + <view class="nav-text"> + {{item.name}} </view> </view> </view> @@ -19,22 +18,22 @@ return { navs:[ { - text:'鍏ュ簱', + name:'鍏ュ簱', icon:'download', clicked:'' }, { - text:'鍑哄簱', + name:'鍑哄簱', icon:'upload', clicked:'' }, { - text:'鐩樼偣', + name:'鐩樼偣', icon:'compose', clicked:'' }, { - text:'閫�鍑虹櫥褰�', + name:'閫�鍑虹櫥褰�', icon:'close', clicked:'' }, @@ -60,17 +59,18 @@ </script> <style> - .home-nav { - width: 100%; - } + @import url("@/static/css/common.css"); .home-nav-item { - width: 33.33%; + width: 44%; height: 0; - padding-bottom: 33.33%; - margin-top: 1%; - border-bottom: 1px solid #cbcbcb; - border-right: 1px solid #cbcbcb; + padding-bottom: 50%; + margin-left: 4%; + margin-top: 5%; display: inline-block; + box-shadow: 0 0 2px #dcdcdc; + /* border: 1px solid #dcdcdc; + border-right: 1px solid #dcdcdc; + border-left: 1px solid #dcdcdc; */ } .home-nav-item:first-child { @@ -86,6 +86,7 @@ width: 100%; height: 0; margin-bottom: 20%; + font-size: 32rpx; text-align: center; } .grey { -- Gitblit v1.9.1