<template>
  <van-tabbar v-model="active">
    <van-tabbar-item icon="bullhorn-o">消息</van-tabbar-item>
    <van-tabbar-item icon="apps-o">工作台</van-tabbar-item>
    <van-tabbar-item icon="cluster-o">通讯录</van-tabbar-item>
    <van-tabbar-item icon="contact">我的</van-tabbar-item>
  </van-tabbar>
</template>

<script>
  export default {
    props:{
      active_index:{
        type: Number,
        default: 0
      }
    },
    watch:{
      active(val,old){
        this.$emit('update:active_index', val)
        this.active_index = val
      }
    },
    data(){
      return {
        active:this.active_index
      }
    }
  }
</script>

<style scoped>

</style>
