|
快速点击切换几次,然后就进入死循环自动闪切,不会自动停止
<div class="fbox stock_nav">
<tabs onchange="changeTabactive" index="{{stn}}">
<tab-bar>
<div class="{{stn === 0 ? 'on' : ''}}" ><text class="text">自选股</text></div>
<div class="{{stn === 1 ? 'on' : ''}}" ><text class="text">历史搜索</text></div>
<div class="{{stn === 2 ? 'on' : ''}}" ><text class="text">排行榜</text></div>
<div class="{{stn === 3 ? 'on' : ''}}" ><text class="text">指数</text></div>
</tab-bar>
<tab-content class="tab-content">
<div class="tab-content-section">
<text>content1</text>
</div>
<div class="tab-content-section">
<text>content2</text>
</div>
<div class="tab-content-section">
<text>content3</text>
</div>
<div class="tab-content-section">
<text>content3</text>
</div>
</tab-content>
</tabs>
</div>
<script>
import router from '@system.router'
export default {
data: {
stn: 0
},
changeTabactive (evt) {
this.stn = evt.index
},
clickTabBar (index) {
this.stn = index
},
routePage (param) {
router.push({
uri: param
})
}
}
</script> |
|