Commit a6675cb4 by 李嘉林

横向标签优化

parent 20be9870
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
</div> </div>
<van-tabs <van-tabs
v-if="showVanTabs" v-if="showVanTabs"
:tab-class="['vanTab','defaultFontSize',tabStyle==1?'defTabAfter':'defaultTabUnderlineAfter']" :tab-class="['vanTab','defaultFontSize',['defTabAfter','defaultTabUnderlineAfter','defTabAfter2'][tabStyle2 - 1]]"
:tab-active-class="['activeTab','selectFontSize',tabStyle==1?'selTabAfter':'selTabUnderLineAfter']" :tab-active-class="['activeTab','selectFontSize',tabStyle!=2?'selTabAfter':'selTabUnderLineAfter']"
:custom-class="['customClass',tabStyle==1?'selectTabBackgroundColor':'selectTabUnderlineColor',tabShadow == 1 && tabStyle == 1 ? 'tabShadow' : '']" :custom-class="['customClass',tabStyle!=2?'selectTabBackgroundColor':'selectTabUnderlineColor',tabShadow == 1 && tabStyle != 2 ? 'tabShadow' : '']"
ref="vanTabs" ref="vanTabs"
v-model="active" v-model="active"
@change="changeTab" @change="changeTab"
...@@ -308,7 +308,7 @@ export default { ...@@ -308,7 +308,7 @@ export default {
}, },
defaultTabTextColor() { defaultTabTextColor() {
if(this.defaultTabText==1){ if(this.defaultTabText==1){
if(this.tabStyle==1){ if(this.tabStyle!=2){
return "var(--main-color)" return "var(--main-color)"
} else { } else {
return "rgba(0,0,0,0.4)" return "rgba(0,0,0,0.4)"
...@@ -351,7 +351,7 @@ export default { ...@@ -351,7 +351,7 @@ export default {
}, },
selectTabTextColor() { selectTabTextColor() {
if(this.selectTabText==1){ if(this.selectTabText==1){
if(this.tabStyle==1){ if(this.tabStyle!=2){
return "#fff" return "#fff"
}else { }else {
return "#333" return "#333"
...@@ -720,6 +720,31 @@ $wrapWidth: 50px; ...@@ -720,6 +720,31 @@ $wrapWidth: 50px;
z-index: -1; z-index: -1;
} }
} }
.defTabAfter2{
.mainLabel2{
position: relative;
&::after{
content: "";
position:absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-radius: 34px;
background: var(--default-tab-background-bolor);
z-index: -1;
}
}
}
.activeTab{
.mainLabel2{
&::after{
background: transparent;
}
}
}
.selTabAfter{ .selTabAfter{
&::after{ &::after{
transition: background 0.1s; transition: background 0.1s;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<block wx:else> <block wx:else>
<input class="search-input" type="text" placeholder="{{placeholderValue}}" bindinput="onInput" value="{{searchValue}}"></input> <input class="search-input" type="text" placeholder="{{placeholderValue}}" bindinput="onInput" value="{{searchValue}}"></input>
</block> </block>
<view class="svg-wrapper" catchtap="handleScan"> <view class="svg-wrapper" catchtap="handleScan" wx:if="{{datas.componentData['searchModel'] == 1}}">
<image class="scan-svg" src="/static/svg/scanCode.svg" /> <image class="scan-svg" src="/static/svg/scanCode.svg" />
</view> </view>
</view> </view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment