<template>
  <el-tag :type="type">{{statusName}}</el-tag>
</template>

<script>
export default {
  props: {
    status: {
      type: Number,
      required: true
    }
  },
  computed: {
    statusName() {
      if (this.status === 0) {
        return this.$t('未支付')
      } else if (this.status === 1) {
        return this.$t('已支付')
      } else {
        return this.$t('已取消')
      }
    },
    type() {
      if (this.status === 1) {
        return 'success'
      } else if (this.status === 0) {
        return 'danger'
      } else {
        return 'warning'
      }
    }
  }
}
</script>
