index.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <div id="follow">
  3. <div class="follow-box">
  4. <div class="follow-pic">
  5. <img :src="datas.heade" alt="" />
  6. </div>
  7. <div class="follow-info">
  8. <span>{{ datas.followName }}</span>
  9. </div>
  10. <div class="follow-right">
  11. <van-button color="#07C160">关注公众号</van-button>
  12. </div>
  13. </div>
  14. <!-- 删除组件 -->
  15. <slot name="deles" />
  16. </div>
  17. </template>
  18. <script>
  19. export default {
  20. name: 'follow',
  21. props: {
  22. datas: Object,
  23. },
  24. }
  25. </script>
  26. <style lang="less" scoped>
  27. #follow {
  28. position: relative;
  29. width: 100%;
  30. padding: 5px 10px;
  31. box-sizing: border-box;
  32. .follow-box {
  33. display: flex;
  34. flex-direction: row;
  35. justify-content: space-between;
  36. align-items: center;
  37. border: 1px solid #999;
  38. border-radius: 5px;
  39. padding: 10px;
  40. box-sizing: border-box;
  41. .follow-pic {
  42. width: 50px;
  43. height: 50px;
  44. img {
  45. display: block;
  46. width: 100%;
  47. height: 100%;
  48. border-radius: 50%;
  49. }
  50. }
  51. .follow-info {
  52. flex: 1;
  53. margin-left: 20px;
  54. font-size: 14px;
  55. color: #333;
  56. }
  57. }
  58. }
  59. </style>