dy.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <view>
  3. <statusBar :item="navBarData"></statusBar>
  4. <view class="main_part">
  5. <view class="content">
  6. <img class="image" src="../../static/logo.png" alt="" />
  7. <view class="text">
  8. <p class="t1">橘子很橘子</p>
  9. <p class="dy">订阅了您的教研室&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2023-04-01</p>
  10. </view>
  11. <button class="btn">回粉</button>
  12. </view>
  13. <view class="content">
  14. <img class="image" src="../../static/logo.png" alt="" />
  15. <view class="text">
  16. <p class="t1">橘子很橘子</p>
  17. <p class="dy">订阅了您的教研室&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2023-04-01</p>
  18. </view>
  19. <button class="btn">回粉</button>
  20. </view>
  21. <view class="content">
  22. <img class="image" src="../../static/logo.png" alt="" />
  23. <view class="text">
  24. <p class="t1">橘子很橘子</p>
  25. <p class="dy">订阅了您的教研室&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2023-04-01</p>
  26. </view>
  27. <button class="btn">+关注</button>
  28. </view>
  29. <view class="content">
  30. <img class="image" src="../../static/logo.png" alt="" />
  31. <view class="text">
  32. <p class="t1">橘子很橘子</p>
  33. <p class="dy">订阅了您的教研室&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2023-04-01</p>
  34. </view>
  35. <button class="btn">互相关注</button>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. export default {
  42. data() {
  43. return {
  44. navBarData: {
  45. title: '新增订阅',
  46. btn: 1
  47. }
  48. };
  49. }
  50. };
  51. </script>
  52. <style lang="scss" scoped>
  53. .content {
  54. margin-top: 5px;
  55. background-color: white;
  56. display: flex;
  57. flex-direction: row; /* 使内容垂直排列 */
  58. padding: 10px;
  59. .image {
  60. width: 58px;
  61. height: 58px;
  62. border-radius: 50%;
  63. }
  64. .text {
  65. flex-grow: 1; /* 填充剩余空间,并根据其内容自适应宽度 */
  66. padding: 5px;
  67. line-height: 25px;
  68. .t1,
  69. .dy {
  70. white-space: nowrap;
  71. }
  72. .t1 {
  73. font-weight: 600px;
  74. font-size: 16px;
  75. color: black;
  76. }
  77. .dy {
  78. font-size: 12px;
  79. color: #999999;
  80. }
  81. }
  82. .btn {
  83. // flex-grow: 1; /* 填充剩余空间 */
  84. // display: flex;
  85. // justify-content: center; /* 水平居中 */
  86. // align-items: center; /* 垂直居中 */
  87. background-color: #adadad;
  88. width: 100px;
  89. height: 35px;
  90. border-radius: 42px;
  91. margin-top: 15px;
  92. // margin-left: 25px;
  93. text-align: center;
  94. line-height: 35px;
  95. color: white;
  96. }
  97. }
  98. </style>