martial-arts/pages/tabbar/pagehome/pagehome.vue

60 lines
1.3 KiB
Vue

<template>
<view>
<status-container :ifReturn="false" titlet="传武佳小程序">
<view slot="content">
<view class="" style="margin-top: -20rpx;">
<swiper-pu newBottom="20rpx" newHeight="460rpx"></swiper-pu>
</view>
<swiper-tab id="tab" :list="dataList" v-model="current" @changeEv="clickTab" :itemColor="'#e42417'" :lineColor="'#e42417'"></swiper-tab>
</view>
</status-container>
<!-- 底部tab -->
<foot-tab></foot-tab>
</view>
</template>
<script>
import swiperPu from '@/components/swipers/swiper-pu.vue';
import swiperTab from '@/components/swiper-tab/swiper-tab.vue';
import footTab from '@/components/foot-tabs/foot-tab.vue';
export default {
components:{
'foot-tab' :footTab,
swiperTab,
swiperPu
},
data() {
return {
current:0,
dataList:[
{title:'课堂讲解'},
{title:'武德教育'},
{title:'爱国主义教育'},
{title:'示范动作讲解'},
],
}
},
onShow() {
// 开启banner图自动轮播
this.$store.commit('setAutoplay',true);
},
onHide() {
// 关闭banner图自动轮播
this.$store.commit('setAutoplay',false);
},
onLoad() {
},
methods: {
// tab点击事件
clickTab(index){
this.current = index;
}
}
}
</script>
<style>
</style>