提交 a4ba4be3 编写于 作者: H hdx

custom-tab-bar: 移除无用代码

上级 1f56102b
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
<view ref="tabbar" class="tab-bar"> <view ref="tabbar" class="tab-bar">
<view class="tab-item" @click="onTabClick(0)"> <view class="tab-item" @click="onTabClick(0)">
<view ref="tab-item1" class="tab-item-content"> <view ref="tab-item1" class="tab-item-content">
<text v-if="displayArrow" class="tab-item-icon tab-item-arrow uni-icon" :class="selectedIndex==0 ? 'tab-item-text-active' : ''"> <text v-if="displayArrow" class="tab-item-icon tab-item-arrow uni-icon"
:class="selectedIndex==0 ? 'tab-item-text-active' : ''">
{{'\ue6bd'}} {{'\ue6bd'}}
</text> </text>
<text v-if="!displayArrow" class="tab-item-icon uni-icon" <text v-if="!displayArrow" class="tab-item-icon uni-icon"
...@@ -84,10 +85,7 @@ ...@@ -84,10 +85,7 @@
} }
}, },
onTabPageEvent(top : number) { onTabPageEvent(top : number) {
// const tabItem1 = this.$refs["tab-item1"] as Element
this.displayArrow = top > this.$tabViewHeight this.displayArrow = top > this.$tabViewHeight
// const angle = displayIcon ? 180 : 0
// tabItem1.style.setProperty('transform', `rotate(${angle}deg)`)
}, },
setSelectedIndex(index : number) { setSelectedIndex(index : number) {
if (this.selectedIndex === index) { if (this.selectedIndex === index) {
...@@ -199,4 +197,4 @@ ...@@ -199,4 +197,4 @@
color: #fff; color: #fff;
font-size: 32px; font-size: 32px;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册