Skip to content

Commit c7ac0b3

Browse files
committed
优化移动端底部图标
1 parent a134407 commit c7ac0b3

23 files changed

+87
-114
lines changed

vol.uniapp/pages.json

Lines changed: 79 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -116,108 +116,102 @@
116116
"style": {
117117
"navigationBarTitleText": "订单详情"
118118
}
119+
}, {
120+
"path": "pages/form/form1",
121+
"style": {
122+
"navigationBarTitleText": "表单vol-form",
123+
"enablePullDownRefresh": false
124+
}
125+
}, {
126+
"path": "pages/form/form2",
127+
"style": {
128+
"navigationBarTitleText": "只读表单vol-form",
129+
"enablePullDownRefresh": false
130+
}
131+
}, {
132+
"path": "pages/table/table1/table1",
133+
"style": {
134+
"navigationBarTitleText": "table水平显示",
135+
"enablePullDownRefresh": false
136+
}
137+
}, {
138+
"path": "pages/table/table2/table2",
139+
"style": {
140+
"navigationBarTitleText": "table列表显示",
141+
"enablePullDownRefresh": false
142+
}
143+
144+
}, {
145+
"path": "pages/table/table3/table3",
146+
"style": {
147+
"navigationBarTitleText": "table手动绑定数据",
148+
"enablePullDownRefresh": false
149+
}
150+
151+
}, {
152+
"path": "pages/pagedemo/pagedemo",
153+
"style": {
154+
"navigationBarTitleText": "完整扩展页面",
155+
"enablePullDownRefresh": false
156+
}
157+
}, {
158+
"path": "pages/message/detail/detail",
159+
"style": {
160+
"navigationBarTitleText": "",
161+
"enablePullDownRefresh": false
162+
}
163+
164+
}, {
165+
"path": "pages/form/charts/chart1",
166+
"style": {
167+
"navigationBarTitleText": "图表",
168+
"enablePullDownRefresh": false
169+
}
170+
171+
}, {
172+
"path": "pages/order/SellOrder/SellOrderAduit",
173+
"style": {
174+
"navigationBarTitleText": "审核",
175+
"enablePullDownRefresh": false
176+
}
177+
119178
}
120-
,{
121-
"path" : "pages/form/form1",
122-
"style" :
123-
{
124-
"navigationBarTitleText": "表单vol-form",
125-
"enablePullDownRefresh": false
126-
}
127-
} ,{
128-
"path" : "pages/form/form2",
129-
"style" :
130-
{
131-
"navigationBarTitleText": "只读表单vol-form",
132-
"enablePullDownRefresh": false
133-
}
134-
}
135-
,{
136-
"path" : "pages/table/table1/table1",
137-
"style" :
138-
{
139-
"navigationBarTitleText": "table水平显示",
140-
"enablePullDownRefresh": false
141-
}
142-
}
143-
,{
144-
"path" : "pages/table/table2/table2",
145-
"style" :
146-
{
147-
"navigationBarTitleText": "table列表显示",
148-
"enablePullDownRefresh": false
149-
}
150-
151-
}
152-
,{
153-
"path" : "pages/table/table3/table3",
154-
"style" :
155-
{
156-
"navigationBarTitleText": "table手动绑定数据",
157-
"enablePullDownRefresh": false
158-
}
159-
160-
}
161-
,{
162-
"path" : "pages/pagedemo/pagedemo",
163-
"style" :
164-
{
165-
"navigationBarTitleText": "完整扩展页面",
166-
"enablePullDownRefresh": false
167-
}
168-
},{
169-
"path" : "pages/message/detail/detail",
170-
"style" :
171-
{
172-
"navigationBarTitleText": "",
173-
"enablePullDownRefresh": false
174-
}
175-
176-
}
177-
,{
178-
"path" : "pages/form/charts/chart1",
179-
"style" :
180-
{
181-
"navigationBarTitleText": "图表",
182-
"enablePullDownRefresh": false
183-
}
184-
185-
}
186-
,{
187-
"path" : "pages/order/SellOrder/SellOrderAduit",
188-
"style" :
189-
{
190-
"navigationBarTitleText": "审核",
191-
"enablePullDownRefresh": false
192-
}
193-
194-
}
195-
],
179+
],
180+
//底部图标库(需要授权的自行联系作者):https://www.iconfont.cn/search/index
196181
"tabBar": { //设置要与第一个pages的path相同
197-
"color": "#7A7E83",
198-
"selectedColor": "#F1A532",
199-
"borderStyle": "black",
182+
"color": "#535353",
183+
"selectedColor": "#2f92f9",
184+
"fontSize": "12px",
185+
"borderStyle": "white", //"white",//#e8e8e8",// "black",
200186
"backgroundColor": "#ffffff",
201187
"list": [{
202-
"pagePath": "pages/menu/menu",
203-
"text": "菜单"
204-
}, {
205188
"pagePath": "pages/home/home",
206-
// "iconPath": "static/assets/home.png",
207-
// "selectedIconPath": "static/assets/home_actived.png",
189+
"iconPath": "static/icons/home.png",
190+
"selectedIconPath": "static/icons/home_active.png",
208191
"text": "首页"
209192
},
210-
193+
{
194+
"pagePath": "pages/menu/menu",
195+
"iconPath": "static/icons/menu.png",
196+
"selectedIconPath": "static/icons/menu_active.png",
197+
"text": "菜单"
198+
},
211199
{
212200
"pagePath": "pages/form/form",
201+
"iconPath": "static/icons/stats.png",
202+
"selectedIconPath": "static/icons/stats_active.png",
213203
"text": "统计"
214204
},
215205
{
216206
"pagePath": "pages/message/message",
207+
"iconPath": "static/icons/message.png",
208+
"selectedIconPath": "static/icons/message_active.png",
217209
"text": "消息"
218210
},
219211
{
220212
"pagePath": "pages/user/user",
213+
"iconPath": "static/icons/user.png",
214+
"selectedIconPath": "static/icons/user_active.png",
221215
"text": "消息"
222216
}
223217
]

vol.uniapp/pages/form/form.vue

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,18 @@
66
<view class="grid-title">
77
<view class="grid-title-text">
88
<view class="grid-title-border"></view>
9-
<view> {{item.name}}</view>
9+
<view> {{item.name}}</view>
1010
</view>
1111
</view>
1212
<view class="grid-item" @click="gridClick(data.path)" v-for="(data,dindex) in item.data" :key="dindex">
1313
<view class="grid-icon" :class="data.bg">
14-
<u-icon color="#ffff" size="22" :name="data.icon"></u-icon>
14+
<u-icon color="#ffff" size="26" :name="data.icon"></u-icon>
1515
</view>
1616
<view class="grid-text">
1717
{{data.name}}
1818
</view>
1919
</view>
2020
</view>
21-
<vol-tabbar :index="2"></vol-tabbar>
2221
</view>
2322
</template>
2423

@@ -114,11 +113,7 @@
114113
]
115114
}
116115
},
117-
onShow() {
118-
uni.hideTabBar({
119-
animation: false
120-
})
121-
},
116+
onShow() {},
122117
methods: {
123118
gridClick(path) {
124119
if (!path) {
@@ -184,10 +179,13 @@
184179
height: 80rpx;
185180
background: #eee;
186181
border-radius: 34rpx;
187-
position: relative;
182+
// position: relative;
188183
left: 0;
189184
right: 0;
190185
margin: auto;
186+
justify-content: center;
187+
align-items: center;
188+
display: flex;
191189
}
192190
193191
.color1 {
@@ -222,9 +220,5 @@
222220
<style scoped>
223221
.grid-list /deep/ .u-icon {
224222
flex-direction: column !important;
225-
position: absolute;
226-
top: 48%;
227-
left: 50%;
228-
transform: translate(-50%, -50%);
229223
}
230224
</style>

vol.uniapp/pages/home/home.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
</u-grid-item>
2222
</u-grid>
2323
</view>
24-
<vol-tabbar :index="0"></vol-tabbar>
2524
</view>
2625
</template>
2726

@@ -69,9 +68,6 @@
6968
})
7069
},
7170
onShow() {
72-
uni.hideTabBar({
73-
animation: false
74-
})
7571
},
7672
methods: {
7773
getStyle(item) {

vol.uniapp/pages/menu/menu.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
</view>
2222

2323
</view>
24-
<vol-tabbar :index="1"></vol-tabbar>
2524
</view>
2625
</template>
2726

@@ -48,9 +47,6 @@
4847
})
4948
},
5049
onShow() {
51-
uni.hideTabBar({
52-
animation: false
53-
})
5450
},
5551
methods: {
5652
getMenu() {

vol.uniapp/pages/message/message.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
</u-list> -->
3131
</u-skeleton>
3232
</view>
33-
<vol-tabbar :index="3"></vol-tabbar>
3433
</view>
3534
</template>
3635

@@ -68,9 +67,6 @@
6867
}
6968
},
7069
async onLoad() {
71-
uni.hideTabBar({
72-
animation: false
73-
})
7470
let _this = this;
7571
uni.getSystemInfo({
7672
success: function(res) {

vol.uniapp/pages/user/user.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
</view>
2424
</view>
2525
</view>
26-
<vol-tabbar :index="4"></vol-tabbar>
2726
</view>
2827
</template>
2928

@@ -81,9 +80,6 @@
8180
})
8281
},
8382
onShow() {
84-
uni.hideTabBar({
85-
animation: false
86-
})
8783
this.getUserInfo();
8884
},
8985
methods: {

vol.uniapp/static/icons/home.png

5.04 KB
Loading
5.26 KB
Loading

vol.uniapp/static/icons/mail.png

3.9 KB
Loading
5.09 KB
Loading

0 commit comments

Comments
 (0)