You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
881 B
50 lines
881 B
<template> |
|
<view class="content"> |
|
<!-- table 切换 --> |
|
<view class="uni_tab_bar"> |
|
<view class="uni_swiper_tab order_top"> |
|
<block v-for="(tabBar,index) in tabBars" :key="tabBar.id"> |
|
<view class="swiper_tab_list" :class="{'active': tabIndex==tabBar.id}" |
|
@click="toggleTab(tabBar.id)"> |
|
{{tabBar.name}} |
|
<view class="swiper_tab_line"> |
|
</view> |
|
</view> |
|
</block> |
|
</view> |
|
</view> |
|
<!--内容区域 --> |
|
</view> |
|
</template> |
|
|
|
<script> |
|
export default { |
|
data() { |
|
return { |
|
tabIndex: 0, //选中标签栏的序列 |
|
tabBars: [{ |
|
name: '支柱产业', |
|
id: '0', |
|
}, |
|
{ |
|
name: '特色产业', |
|
id: '1', |
|
}, |
|
|
|
], |
|
} |
|
}, |
|
methods: { |
|
toggleTab(id) { |
|
console.log(77); |
|
this.tabIndex = id; |
|
if(id==1){ |
|
this.$emit("showpuop",true) |
|
} |
|
}, |
|
} |
|
} |
|
</script> |
|
|
|
<style> |
|
</style>
|
|
|