secNumberStatus.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <span class="sec-number-box">
  3. <el-tooltip
  4. v-if="props.corrected || props.checked"
  5. effect="light"
  6. :content="props.corrected ? '已给分' : props.checked ? '已抽查' : ''"
  7. >
  8. <span v-if="props.corrected" class="status corrected"></span>
  9. <span v-else-if="props.checked" class="status checked"></span>
  10. </el-tooltip>
  11. <span v-if="!props.corrected && !props.checked" class="status2"></span>
  12. <span>{{ props.secretNumber }}</span>
  13. </span>
  14. </template>
  15. <script setup lang="ts" name="SecNumberStatus">
  16. const props = defineProps<{ secretNumber: any; checked: boolean; corrected: boolean }>()
  17. </script>
  18. <style lang="scss" scoped>
  19. .sec-number-box {
  20. .status,
  21. .status2 {
  22. display: inline-block;
  23. width: 10px;
  24. height: 10px;
  25. border-radius: 5px;
  26. background-color: transparent;
  27. margin-right: 8px;
  28. &.corrected {
  29. background-color: #f53f3f;
  30. cursor: pointer;
  31. }
  32. &.checked {
  33. background-color: #00b42a;
  34. cursor: pointer;
  35. }
  36. }
  37. }
  38. </style>