<template>
    <span class="lt-badge" @click="toAuth">
        <slot></slot>
    </span>
</template>

<script>
  export default {
    name: 'lt-badge',
    props:['authStatus'],
    methods:{
        toAuth(){
            if(this.authStatus=="0"){
                this.$router.push({path:'YH-JGZX-ZHXX'});
            }
        }
    },
    
  }
</script>

<style>
    .userInfo .lt-badge {
        display: inline-block;
        height: 15px;
        line-height: 15px;
        font-size: 10px;
        color: #fff;
        padding: 1px 6px;
        border-radius: 2px;
        margin-left: 5px;
    }

    .green {
        background: #32b16c;
    }

    .warn {
        background: #ffb03b;
    }

    .gray {
        background: #c9c9c9;
    }
</style>