<template>
  <el-tag type="success" v-if="value == 1" size="mini">成功</el-tag>
  <el-tag type="danger" v-else size="mini">失败</el-tag>
</template>

<script lang="ts">
import { Component, Prop, Vue, Watch } from "vue-property-decorator";
@Component
export default class SuccessTag extends Vue {
  value:any=null;

  @Prop()
  propConfig: any

  @Prop()
  propValue?:any

  @Prop()
  parentValue:any

  @Watch('propValue')
  propValueChange(v:any){
    this.setValue(v);
  }

  mounted(){
    if(this.propValue){
      this.setValue(this.propValue)
    }
  }

  setValue(v:any){
    this.value = v;
  }
}
</script>

<style lang="scss" scoped>

</style>