<template>
	<view class="mz-subsection border-box">
    <view class="mz-subsection-item border-box" v-for="(item,index) in list"
         :class="{active:(current===index)}"
          @click="handleClick(index)">{{item.name}}</view>
	</view>
</template>

<script>
	export default {
		name: 'MzSubsection',
		props: {
      list:{
        type:Array,
        default:[]
      },
      current:{
        type:Number,
        default:0
      }
		},
		data() {
			return {
				loading: true,
        navInfo:{},
			}
		},
		onLoad() {

		},
    mounted() {

    },
    computed: {

    },
    methods: {
      handleClick(index){
        this.$emit('change',index)
      },
    },
    watch: {

    }
	}
</script>

<style lang="scss">
	@import './components/index.scss';
</style>