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

60 lines
1.3 KiB
Vue
Raw Normal View History

2022-08-01 09:03:10 +00:00
<template>
<view>
<status-container :ifReturn="false" titlet="传武佳小程序">
<view slot="content">
<view class="" style="margin-top: -20rpx;">
2022-08-01 10:18:01 +00:00
<swiper-pu newBottom="20rpx" newHeight="460rpx"></swiper-pu>
2022-08-01 09:03:10 +00:00
</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:'示范动作讲解'},
],
}
},
2022-08-01 10:18:01 +00:00
onShow() {
// 开启banner图自动轮播
this.$store.commit('setAutoplay',true);
},
onHide() {
// 关闭banner图自动轮播
this.$store.commit('setAutoplay',false);
},
2022-08-01 09:03:10 +00:00
onLoad() {
},
methods: {
// tab点击事件
clickTab(index){
this.current = index;
}
}
}
</script>
<style>
</style>