Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
user
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hooloo
mp
user
Commits
18ae5f8f
Commit
18ae5f8f
authored
May 11, 2022
by
zhangpeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整
parent
addd16e1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
112 additions
and
15 deletions
+112
-15
pages.json
+7
-6
pages/menu/menu.vue
+99
-2
store/index.js
+6
-7
No files found.
pages.json
View file @
18ae5f8f
...
@@ -3,11 +3,6 @@
...
@@ -3,11 +3,6 @@
},
},
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
{
"path"
:
"pages/index/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},{
"path"
:
"pages/menu/menu"
,
"path"
:
"pages/menu/menu"
,
"style"
:
"style"
:
{
{
...
@@ -16,7 +11,13 @@
...
@@ -16,7 +11,13 @@
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
}
},
{
"path"
:
"pages/index/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
}
,{
,{
"path"
:
"pages/order/order"
,
"path"
:
"pages/order/order"
,
"style"
:
"style"
:
...
...
pages/menu/menu.vue
View file @
18ae5f8f
<
template
>
<
template
>
<view>
<view>
<view>
菜单
</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>
</view>
</
template
>
</
template
>
...
@@ -9,7 +103,7 @@
...
@@ -9,7 +103,7 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
selectedTabbar
:
0
,
}
}
},
},
computed
:{
computed
:{
...
@@ -20,6 +114,9 @@
...
@@ -20,6 +114,9 @@
},
},
methods
:
{
methods
:
{
beforeSwitch
(
index
)
{
beforeSwitch
(
index
)
{
console
.
log
(
index
,
44
)
this
.
selectedTabbar
=
index
;
uni
.
switchTab
({
url
:
this
.
list
[
index
].
pagePath
});
return
true
;
return
true
;
}
}
}
}
...
...
store/index.js
View file @
18ae5f8f
...
@@ -5,23 +5,22 @@ const store = new Vuex.Store({
...
@@ -5,23 +5,22 @@ const store = new Vuex.Store({
state
:
{
state
:
{
list
:
[
list
:
[
{
{
icon
Path
:
"/static/logo.png"
,
icon
:
"/static/logo.png"
,
selectedIconPath
:
"/static/logo.png"
,
activeIcon
:
'/static/logo.png'
,
customIcon
:
false
,
customIcon
:
false
,
pagePath
:
"/pages/menu/menu"
,
pagePath
:
"/pages/menu/menu"
,
text
:
'菜单'
text
:
'菜单'
},
},
{
{
icon
Path
:
"/static/logo.png"
,
icon
:
"/static/logo.png"
,
selectedIconPath
:
"/static/logo.png"
,
activeIcon
:
'/static/logo.png'
,
pagePath
:
"/pages/order/order"
,
pagePath
:
"/pages/order/order"
,
text
:
'订单'
,
text
:
'订单'
,
customIcon
:
false
customIcon
:
false
},
},
{
{
iconPath
:
"/static/logo.png"
,
icon
:
"/static/logo.png"
,
selectedIconPath
:
"/static/logo.png"
,
activeIcon
:
'/static/logo.png'
,
customIcon
:
false
,
pagePath
:
"/pages/mine/mine"
,
pagePath
:
"/pages/mine/mine"
,
text
:
'我的'
text
:
'我的'
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment