<template>
  <el-tabs class="p20" v-model="activeIndex">
    <el-tab-pane label="全部" :name="''">
      <delivery-list :type="''"></delivery-list>
    </el-tab-pane>
    <el-tab-pane :label="`未发货（${count}）`" :name="0">
      <delivery-list :type="0" @count="setCount"></delivery-list>
    </el-tab-pane>
    <el-tab-pane label="已发货" :name="1">
      <delivery-list :type="1"></delivery-list>
    </el-tab-pane>
  </el-tabs>
</template>

<script>
import deliveryList from './delivery-list';

export default {
  name: 'Delivery',
  components: { deliveryList },
  data() {
    return {
      activeIndex: '',
      count: 0,
    };
  },
  methods: {
    setCount(value) {
      this.count = value;
    }
  }
};
</script>
