<template>
  <div>
    <div>
      <el-badge
        is-dot
        class="item"
      >
        {{ item.label }}
      </el-badge>
    </div>
  </div>
</template>
<script>
  export default {
    name: 'TimeLeft',
    props:['item'],
    data() {
      return {
        timer: null,
        time:60
      };
    },
    mounted() {

    },
    methods: {
      down() {
        this.timer = setInterval(() => {
          this.time--;
          if (this.time === 0) {
            this.$emit('setItem');
            clearInterval(this.timer);
          }
        }, 1000);
      },
    },
  };
</script>

<style lang="scss" scoped>
</style>
