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
4fe74fa2
Commit
4fe74fa2
authored
Feb 23, 2021
by
程智春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
底部栏样式
parent
4ac35289
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
3 deletions
+43
-3
custom-tab-bar/index.js
+30
-1
custom-tab-bar/index.wxml
+2
-2
custom-tab-bar/index.wxss
+10
-0
project.config.json
+0
-0
src/App.vue
+1
-0
No files found.
custom-tab-bar/index.js
View file @
4fe74fa2
const
app
=
getApp
();
console
.
log
(
app
,
"apppppppppp"
);
...
...
@@ -65,7 +66,34 @@ Component({
],
mm
:
false
,
componentData
:
{},
show
:
true
show
:
true
,
mmm
:
false
,
mainColor
:
''
},
ready
(){
if
(
app
.
themeColor
[
'--main-color'
]
!=
'#ffffff'
)
{
this
.
setData
({
mainColor
:
app
.
themeColor
[
'--main-color'
]
})
}
else
{
app
.
themeColorCallBack
=
(
res
)
=>
{
this
.
setData
({
mainColor
:
res
[
'--main-color'
]
})
}
}
console
.
log
(
this
.
data
.
themeColor
,
'themeColor'
)
if
(
typeof
this
.
getTabBar
===
"function"
&&
this
.
getTabBar
())
{
this
.
getTabBar
().
setData
({
selected
:
1
});
}
this
.
setData
({
mmm
:
Math
.
ceil
(
app
.
globalData
.
footerVal
.
componentData
.
list
.
length
/
2
-
1
)
})
console
.
log
(
Math
.
ceil
(
app
.
globalData
.
footerVal
.
componentData
.
list
.
length
/
2
-
1
),
this
.
data
.
selected
)
console
.
log
(
this
.
data
.
mmm
,
'ready'
)
},
attached
()
{
let
that
=
this
;
...
...
@@ -78,6 +106,7 @@ Component({
list
:
app
.
globalData
.
footerVal
.
componentData
.
list
,
mm
:
mm
});
console
.
log
(
'777777'
,
Math
.
ceil
(
this
.
data
.
list
.
length
/
2
-
1
),
this
.
data
.
selected
,
this
.
data
.
componentData
[
'styleSelectionNum'
])
}
else
{
console
.
log
(
73333381
)
...
...
custom-tab-bar/index.wxml
View file @
4fe74fa2
<!--miniprogram/custom-tab-bar/index.wxml-->
<view class="tab-bar {{show?'':'hide'}}">
<view class="tab-bar {{show?'':'hide'}}"
style="--main-color : {{mainColor}}"
>
<!-- <view class="antt ant-daipinglun"></view> -->
<!-- <view class="iconfont icon-fenzhi">3</view> -->
...
...
@@ -7,7 +7,7 @@
<view
wx:for="{{list}}"
wx:key="index"
class="tab-bar-item {{(
Math.ceil(list.length/2-1)==selected&&componentData['styleSelectionNum']==1)?isItem
:''}}"
class="tab-bar-item {{(
mmm==index&&componentData['styleSelectionNum']==1)?'isItem'
:''}}"
data-path="{{item.link}}"
data-index="{{index}}"
bindtap="switchTab"
...
...
custom-tab-bar/index.wxss
View file @
4fe74fa2
...
...
@@ -1411,6 +1411,16 @@
.isItem {
transform: translateY(-30%)
}
.isItem .antt{
width:50px;
height: 50px;
background: var(--main-color);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
border: 8rpx solid #fff;
}
.icons {
width: 50px;
height: 50px;
...
...
project.config.json
View file @
4fe74fa2
src/App.vue
View file @
4fe74fa2
...
...
@@ -168,6 +168,7 @@ export default {
themeColor
[
"--main-color"
]
=
val
.
themeColor
.
mainColor
;
themeColor
[
"--minor-color"
]
=
val
.
themeColor
.
minorColor
;
mpApp
.
themeColorCallBack
(
themeColor
);
mpApp
.
themeColor
=
themeColor
//
console
.
log
(
this
.
mpApp
,
"mmmmm74"
,
themeColor
);
}
...
...
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