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
761a0221
Commit
761a0221
authored
Mar 01, 2022
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
横向标签铺满样式调整
parent
2eed8a7b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
18 deletions
+16
-18
src/components/basicTool/transverse-label/index.vue
+8
-11
static/vant/tabs/index.wxml
+1
-1
static/vant/tabs/index.wxs
+7
-6
No files found.
src/components/basicTool/transverse-label/index.vue
View file @
761a0221
...
...
@@ -46,7 +46,7 @@
:class=
"[
'defaultTabsStyle',
'defaultTabsStyle' + componentIndex,
tabStyle == 1 ? 'tabStyle1' : 'tabStyle2'
,
'tabStyle' + tabStyle
,
stickyTop ? 'stickyTop' : '',
'tabLayout' + tabLayout,
]"
...
...
@@ -68,7 +68,7 @@
<banner
:datas=
"item1"
></banner>
</div>
<div
v-else-if=
"item1.componentCode=='goods-list' && item1.componentInfo.visible == 1"
style=
"height:100%;"
>
<goods-list
:class=
"['goodsListItem']
"
:datas=
"item1"
></goods-list>
<goods-list
class=
"goodsListItem
"
:datas=
"item1"
></goods-list>
</div>
<div
v-else-if=
"item1.componentCode == 'area-navigation' && item1.componentInfo.visible == 1"
>
<area-navigation
:datas=
"item1"
:changeLocation=
"changeLocation"
></area-navigation>
...
...
@@ -569,11 +569,8 @@ export default {
.tabStyle1
{
.van-tabs__line
{
height
:
auto
;
bottom
:
4px
;
top
:
4px
;
left
:
8px
;
right
:
8px
;
height
:
30px
;
bottom
:
6px
;
border-radius
:
38px
;
}
}
...
...
@@ -614,8 +611,8 @@ export default {
content
:
""
;
position
:
absolute
;
bottom
:
4px
;
left
:
8px
;
right
:
8px
;
left
:
0
;
right
:
0
;
top
:
4px
;
border-radius
:
34px
;
background
:
var
(
--default-tab-background-bolor
);
...
...
@@ -635,8 +632,8 @@ export default {
content
:
""
;
position
:
absolute
;
bottom
:
4px
;
left
:
8px
;
right
:
8px
;
left
:
0
;
right
:
0
;
height
:
4px
;
background
:
var
(
--default-tab-underline-color
);
z-index
:
-1
;
...
...
static/vant/tabs/index.wxml
View file @
761a0221
...
...
@@ -20,7 +20,7 @@
style="{{ color ? 'border-color: ' + color : '' }}"
>
<view class="{{ utils.bem('tabs__nav', [type, { complete: !ellipsis }]) }} nav-class" style="{{ computed.navStyle(color, type) }}">
<view wx:if="{{ type === 'line' }}" class="van-tabs__line" style="{{ computed.lineStyle({ color, lineOffsetLeft, lineHeight, skipTransition, duration, lineWidth }) }}" />
<view wx:if="{{ type === 'line' }}" class="van-tabs__line" style="{{ computed.lineStyle(
linePosition,
{ color, lineOffsetLeft, lineHeight, skipTransition, duration, lineWidth }) }}" />
<view
wx:for="{{ tabs }}"
wx:key="index"
...
...
static/vant/tabs/index.wxs
View file @
761a0221
...
...
@@ -57,11 +57,14 @@ function trackStyle(data) {
});
}
function lineStyle(data) {
function lineStyle(linePosition,data) {
// 横向标签平铺模式缩短宽度
var lineWidth = linePosition == 3?(data.lineWidth - 32):data.lineWidth
var lineOffsetLeft = linePosition == 3 ? (data.lineOffsetLeft + 16) : data.lineOffsetLeft
return style({
width: utils.addUnit(
data.lineWidth - 32
),
transform: 'translateX(' +
(data.lineOffsetLeft +16)
+ 'px)',
'-webkit-transform': 'translateX(' +
(data.lineOffsetLeft + 16)
+ 'px)',
width: utils.addUnit(
lineWidth
),
transform: 'translateX(' +
lineOffsetLeft
+ 'px)',
'-webkit-transform': 'translateX(' +
lineOffsetLeft
+ 'px)',
'background-color': data.color,
height: data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,
'border-radius':
...
...
@@ -80,5 +83,3 @@ module.exports = {
lineStyle: lineStyle,
navStyle: navStyle,
};
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