contactBlock.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <div @click="handleClick(userData)" class="contact-container clearfix">
  3. <img class="user-profile" :src="userData.userImg||require('../../static/contact/myavt.png')">
  4. <p class="user-name">{{userData.username}}<span class="user-realname">{{userData.userRealname}}</span></p>
  5. <p class="phone">{{userData.phone}}</p>
  6. </div>
  7. </template>
  8. <script>
  9. export default {
  10. name: "contactBlock",
  11. props:['userData'],
  12. methods:{
  13. handleClick(user){
  14. this.$emit('click',user)
  15. }
  16. }
  17. }
  18. </script>
  19. <style scoped>
  20. .contact-container{
  21. width: 100%;
  22. height: 1.7rem;
  23. background-color: white;
  24. box-shadow: 0rem 0rem 0.3rem 0.1rem
  25. rgba(96, 192, 255, 0.35);
  26. border-radius: 0.1rem;
  27. margin-top: 0.4rem;
  28. }
  29. .user-profile{
  30. float: left;
  31. width: 1.2rem;
  32. height: 1.2rem;
  33. margin:0.25rem 0.3rem;
  34. }
  35. .user-name{
  36. font-size: 0.4rem;
  37. line-height: 0.6rem;
  38. color:#1491e2;
  39. margin-top: 0.3rem;
  40. text-align: left;
  41. }
  42. .user-realname{
  43. height: 0.6rem;
  44. font-size: 0.3rem;
  45. color: white;
  46. background-color: #60c0ff;
  47. border-radius: 0.3rem;
  48. padding: 0.1rem 0.15rem;
  49. margin-left: 0.3rem;
  50. }
  51. .phone{
  52. text-align: left;
  53. margin-top: 0.05rem;
  54. font-size: 0.4rem;
  55. color: #666666;
  56. }
  57. </style>