User.vue 893 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <div class="user-item">
  3. <img width="72" :src="src" class="user1-img" />
  4. <div class="user1-text">{{ text }}</div>
  5. </div>
  6. </template>
  7. <script setup>
  8. import defaultUserSrc from '~/assets/svg/home/user1.svg'
  9. const props = defineProps({
  10. text: {
  11. type: String,
  12. default: "正常访客",
  13. required: true,
  14. },
  15. src: {
  16. type: String,
  17. default: defaultUserSrc,
  18. required: true,
  19. }
  20. });
  21. </script>
  22. <style lang="scss" scoped>
  23. .user-item {
  24. display: flex;
  25. flex-direction: column;
  26. justify-content: center;
  27. align-items: center;
  28. .user1-text {
  29. display: flex;
  30. width: 162px;
  31. height: 54px;
  32. justify-content: center;
  33. align-items: center;
  34. align-self: stretch;
  35. border-radius: 8px;
  36. border: 1px solid #A39DFF;
  37. background: #3F337D;
  38. color: #FFF;
  39. font-size: 20px;
  40. font-weight: 400;
  41. line-height: 20px;
  42. }
  43. }
  44. </style>