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
33827bbb
Commit
33827bbb
authored
Feb 24, 2021
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
还原代码
parent
4ced7a61
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
105 additions
and
8 deletions
+105
-8
custom-tab-bar/index.js
+63
-2
custom-tab-bar/index.wxss
+42
-6
No files found.
custom-tab-bar/index.js
View file @
33827bbb
...
@@ -63,23 +63,77 @@ Component({
...
@@ -63,23 +63,77 @@ Component({
visible
:
1
visible
:
1
}
}
],
],
mm
:
false
,
componentData
:
{},
componentData
:
{},
show
:
true
,
show
:
true
,
showFlag
:
"up"
,
mmm
:
false
,
mainColor
:
""
,
showFlag
:
"up"
},
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
()
{
attached
()
{
let
that
=
this
;
let
that
=
this
;
if
(
app
.
globalData
.
footerVal
)
{
if
(
app
.
globalData
.
footerVal
)
{
let
mm
=
Math
.
ceil
(
app
.
globalData
.
footerVal
.
componentData
.
list
.
length
/
2
-
1
)
==
that
.
data
.
selected
&&
app
.
globalData
.
footerVal
.
componentData
[
"styleSelectionNum"
]
==
1
;
console
.
log
(
733333
,
mm
);
that
.
setData
({
that
.
setData
({
componentData
:
app
.
globalData
.
footerVal
.
componentData
,
componentData
:
app
.
globalData
.
footerVal
.
componentData
,
list
:
app
.
globalData
.
footerVal
.
componentData
.
list
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
{
}
else
{
console
.
log
(
73333381
);
app
.
footerCallBack
=
function
(
params
)
{
app
.
footerCallBack
=
function
(
params
)
{
console
.
log
(
"back"
);
that
.
setData
({
that
.
setData
({
componentData
:
params
.
componentData
,
componentData
:
params
.
componentData
,
list
:
params
.
componentData
.
list
list
:
params
.
componentData
.
list
// mm:(Math.ceil(params.componentData.list.length/2-1)==that.data.selected&¶ms.componentData['styleSelectionNum']==1)
});
});
let
mm
=
Math
.
ceil
(
params
.
componentData
.
list
.
length
/
2
-
1
)
==
that
.
data
.
selected
&&
params
.
componentData
[
"styleSelectionNum"
]
==
1
;
console
.
log
(
"87777777"
,
mm
);
};
};
}
}
...
@@ -89,6 +143,13 @@ Component({
...
@@ -89,6 +143,13 @@ Component({
app
.
webviewCallBack
=
function
(
state
,
params
)
{
app
.
webviewCallBack
=
function
(
state
,
params
)
{
console
.
log
(
"webview变化"
,
state
,
params
);
console
.
log
(
"webview变化"
,
state
,
params
);
};
};
//
this
.
setData
({
mm
:
Math
.
ceil
(
this
.
data
.
list
.
length
/
2
-
1
)
==
this
.
data
.
selected
&&
this
.
data
.
componentData
[
"styleSelectionNum"
]
==
1
});
},
},
methods
:
{
methods
:
{
init
()
{},
init
()
{},
...
...
custom-tab-bar/index.wxss
View file @
33827bbb
...
@@ -1378,13 +1378,18 @@
...
@@ -1378,13 +1378,18 @@
bottom: 0;
bottom: 0;
left: 0;
left: 0;
right: 0;
right: 0;
height: 48px;
height: 51px;
background: white;
display: flex;
display: flex;
padding-bottom: env(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
font-size: 10px;
width: 100%;
bottom: 0;
left: 0;
background: #f5f5f4;
border-top: 1px solid #e2e2e2;
}
}
.tab-bar-border {
/*
.tab-bar-border {
background-color: rgba(0, 0, 0, 0.33);
background-color: rgba(0, 0, 0, 0.33);
position: absolute;
position: absolute;
left: 0;
left: 0;
...
@@ -1392,7 +1397,7 @@
...
@@ -1392,7 +1397,7 @@
width: 100%;
width: 100%;
height: 1px;
height: 1px;
transform: scaleY(0.5);
transform: scaleY(0.5);
}
}
*/
.tab-bar-item {
.tab-bar-item {
flex: 1;
flex: 1;
...
@@ -1403,6 +1408,30 @@
...
@@ -1403,6 +1408,30 @@
flex-direction: column;
flex-direction: column;
}
}
.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;
background: var(--main-color);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
border: 4px solid #fff;
}
.tab-bar-item cover-image {
.tab-bar-item cover-image {
width: 27px;
width: 27px;
height: 27px;
height: 27px;
...
@@ -1412,11 +1441,18 @@
...
@@ -1412,11 +1441,18 @@
/* font-size: 10px; */
/* font-size: 10px; */
}
}
.img-view cover-image{
/* .img-view{
object-fit: contain;
display: flex;
align-items: center;
} */
.img-view image{
/* object-fit: contain; */
width: 100%;
width: 100%;
height: 100%;
height: 100%;
}
}
.text{
margin-top: 4rpx;
}
.hide{
.hide{
display: none;
display: none;
...
...
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