Commit 18ae5f8f by zhangpeng

调整

parent addd16e1
......@@ -3,11 +3,6 @@
},
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": ""
}
},{
"path" : "pages/menu/menu",
"style" :
{
......@@ -16,7 +11,13 @@
"enablePullDownRefresh": false
}
}
},
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": ""
}
}
,{
"path" : "pages/order/order",
"style" :
......
<template>
<view>
<view>菜单</view>
<u-tabbar :list="list" inactive-color="#000000" active-color="#006ECF" :before-switch="beforeSwitch"></u-tabbar>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单</view>
<view>菜单111</view>
<u-tabbar :value="selectedTabbar" :border="false" inactive-color="#000000" active-color="#006ECF" :fixed="true" :safeAreaInsetBottom="true" @change="beforeSwitch">
<u-tabbar-item v-for="(item,index) in list" :key="item.text" :text="item.text" :icon="selectedTabbar==index?item.activeIcon:item.icon"></u-tabbar-item>
</u-tabbar>
</view>
</template>
......@@ -9,7 +103,7 @@
export default {
data() {
return {
selectedTabbar:0,
}
},
computed:{
......@@ -20,6 +114,9 @@
},
methods: {
beforeSwitch(index) {
console.log(index,44)
this.selectedTabbar=index;
uni.switchTab({url:this.list[index].pagePath});
return true;
}
}
......
......@@ -5,23 +5,22 @@ const store = new Vuex.Store({
state: {
list: [
{
iconPath: "/static/logo.png",
selectedIconPath: "/static/logo.png",
icon: "/static/logo.png",
activeIcon: '/static/logo.png',
customIcon: false,
pagePath: "/pages/menu/menu",
text: '菜单'
},
{
iconPath: "/static/logo.png",
selectedIconPath: "/static/logo.png",
icon: "/static/logo.png",
activeIcon: '/static/logo.png',
pagePath: "/pages/order/order",
text: '订单',
customIcon: false
},
{
iconPath: "/static/logo.png",
selectedIconPath: "/static/logo.png",
customIcon: false,
icon: "/static/logo.png",
activeIcon: '/static/logo.png',
pagePath: "/pages/mine/mine",
text: '我的'
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment