IndexStatus.vue 706 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <view class="plc-color">
  3. <view class="default-box" :class="color"></view>
  4. <view>{{text}}</view>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. props:['text','color'],
  10. name:"IndexStatus",
  11. data() {
  12. return {
  13. };
  14. }
  15. }
  16. </script>
  17. <style lang="scss" scoped>
  18. .plc-color{
  19. display: flex;
  20. height: 20px;
  21. margin-right: 10px;
  22. align-items: center;
  23. .default-box{
  24. width: 8px;
  25. height: 8px;
  26. border-radius: 1px;
  27. margin-top: 2px;
  28. margin-right: 2px;
  29. font-size: 12px;
  30. }
  31. .green{background: #91FDB9;}
  32. .orange{background: #ED7735;}
  33. .yellow{background: #F6BB47;}
  34. .pink{background: #FF6E6E;}
  35. .default{background: #414A63;}
  36. }
  37. </style>