LtBadge.vue 756 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <span class="lt-badge" @click="toAuth">
  3. <slot></slot>
  4. </span>
  5. </template>
  6. <script>
  7. export default {
  8. name: 'lt-badge',
  9. props:['authStatus'],
  10. methods:{
  11. toAuth(){
  12. if(this.authStatus=="0"){
  13. this.$router.push({path:'YH-JGZX-ZHXX'});
  14. }
  15. }
  16. },
  17. }
  18. </script>
  19. <style>
  20. .userInfo .lt-badge {
  21. display: inline-block;
  22. height: 15px;
  23. line-height: 15px;
  24. font-size: 10px;
  25. color: #fff;
  26. padding: 1px 6px;
  27. border-radius: 2px;
  28. margin-left: 5px;
  29. }
  30. .green {
  31. background: #32b16c;
  32. }
  33. .warn {
  34. background: #ffb03b;
  35. }
  36. .gray {
  37. background: #c9c9c9;
  38. }
  39. </style>