Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
7560f9df
Commit
7560f9df
authored
Jan 28, 2021
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tabbar
parent
add36e11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
10 deletions
+21
-10
custom-tab-bar/index.js
+18
-10
custom-tab-bar/index.wxml
+3
-0
custom-tab-bar/index.wxss
+0
-0
src/components/tabbarPage.vue
+0
-0
No files found.
custom-tab-bar/index.js
View file @
7560f9df
...
...
@@ -2,6 +2,17 @@ const app = getApp()
console
.
log
(
app
,
'apppppppppp'
)
Component
({
pageLifetimes
:
{
show
()
{
console
.
log
(
'哈哈哈哈'
)
if
(
typeof
this
.
getTabBar
===
'function'
&&
this
.
getTabBar
())
{
this
.
getTabBar
().
setData
({
selected
:
1
})
}
}
},
data
:
{
selected
:
0
,
color
:
"#7A7E83"
,
...
...
@@ -65,7 +76,9 @@ Component({
}
// ----------webview 变化
console
.
log
(
'启动1111'
)
console
.
log
(
'启动1111'
,
this
.
getTabBar
())
app
.
webviewCallBack
=
function
(
state
,
params
)
{
console
.
log
(
'webview变化'
,
state
,
params
)
}
...
...
@@ -75,27 +88,22 @@ Component({
},
switchTab
(
e
)
{
// mpApp.$themeToLink //
const
{
index
}
=
e
.
currentTarget
.
dataset
console
.
log
(
'755555555'
,
this
.
data
.
list
[
index
].
link
)
// if (index == this.data.selected) return
app
.
globalData
.
tabBarPageLink
=
this
.
data
.
list
[
index
].
link
.
link
console
.
log
(
app
,
'aaaa'
)
this
.
toPage
(
this
.
data
.
list
[
index
].
link
,
index
)
app
.
$themeToLink
(
this
.
data
.
list
[
index
][
'link'
],
1
)
// return
// app.$themeToLink(this.data.list[index].link)
// this.toPage(this.data.list[index].link,index)
// this.setData({
// selected: index
// })
},
toPage
(
data
,
index
){
console
.
log
(
'index98'
,
index
)
console
.
log
(
'index98'
,
index
,
this
)
// index=index==0?index+1:index
// 跳转
if
(
data
.
link
==
'/'
)
{
wx
.
switchTab
({
...
...
custom-tab-bar/index.wxml
View file @
7560f9df
<!--miniprogram/custom-tab-bar/index.wxml-->
<cover-view class="tab-bar">
<cover-view class="antt ant-daipinglun"></cover-view>
<cover-view class="iconfont icon-fenzhi">3</cover-view>
<cover-view class="tab-bar-border"></cover-view>
<cover-view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.link}}" data-index="{{index}}"
bindtap="switchTab">
...
...
custom-tab-bar/index.wxss
View file @
7560f9df
This diff is collapsed.
Click to expand it.
src/components/tabbarPage.vue
0 → 100644
View file @
7560f9df
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