<template>
  <el-tag
    effect="dark"
    :type="map[value].type">
    {{ map[value].label }}
  </el-tag>
</template>

<script>
const map = {
  1: {
    label: '启用',
    type: 'success'
  },
  0: {
    label: '停用',
    type: 'danger'
  }
}

export default {
  data () {
    return {
      map
    }
  },
  props: {
    value: {
      type: Number,
      default: 0
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
