contentAllPage.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view class="container content-all-page">
  3. <view class="tab-content">
  4. <view class="item" v-for="item in tabList" :key="item.value" @click="tabClickHandler(item)">
  5. {{ item.name }}
  6. <view class="line-active" v-if="tabActive == item.value"> </view>
  7. </view>
  8. </view>
  9. <view class="content-ul">
  10. <view class="content-li">
  11. <view class="type-time">
  12. <view class="type"> 笔 记</view>
  13. <view class="time"> 2023.08.24 13:13:13</view>
  14. </view>
  15. <view class="title-item"> 标题标题标题标题标题标题标题标题标题标题标题标题</view>
  16. <view class="btn-box">
  17. <view class="cancell-box"> 取消发布</view>
  18. <view class="reject-box"> 驳回理由</view>
  19. <view class="edit-box"> 修改 </view>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. data() {
  28. return {
  29. tabList: [
  30. { name: "草稿箱", value: "1" },
  31. { name: "已发布", value: "2" },
  32. { name: "审核中", value: "3" },
  33. { name: "已驳回", value: "4" },
  34. ],
  35. tabActive: "1",
  36. };
  37. },
  38. methods: {
  39. // top标签点击事件
  40. tabClickHandler(item) {
  41. this.tabActive = item.value;
  42. },
  43. },
  44. };
  45. </script>
  46. <style lang="scss" scope>
  47. .content-all-page {
  48. background-color: #f3f5f9;
  49. .tab-content {
  50. margin-top: 1rpx;
  51. background-color: #fff;
  52. height: 96rpx;
  53. display: flex;
  54. view {
  55. flex: 1;
  56. text-align: center;
  57. line-height: 96rpx;
  58. border-bottom: 2rpx solid #e7e7e7;
  59. }
  60. .item {
  61. position: relative;
  62. .line-active {
  63. position: absolute;
  64. left: 50%;
  65. bottom: 0rpx;
  66. width: 32rpx;
  67. height: 6rpx;
  68. border-radius: 6rpx;
  69. background-color: #376cbb;
  70. transform: translateX(-50%);
  71. }
  72. }
  73. }
  74. .content-ul {
  75. padding: 30rpx;
  76. .content-li {
  77. width: 100%;
  78. height: 256rpx;
  79. padding: 20rpx;
  80. border-radius: 16rpx;
  81. border-top: 10rpx solid #e7e0cd;
  82. background-color: #fff;
  83. .type-time {
  84. display: flex;
  85. align-items: center;
  86. justify-content: space-between;
  87. color: #666666;
  88. .type {
  89. width: 110rpx;
  90. height: 42rpx;
  91. line-height: 42rpx;
  92. text-align: center;
  93. border-radius: 38rpx;
  94. color: #928563;
  95. background-color: #fff6de;
  96. font-weight: 500;
  97. }
  98. }
  99. .title-item {
  100. margin: 10rpx 0 20rpx;
  101. color: #333;
  102. font-size: 32rpx;
  103. font-weight: 500;
  104. line-height: 46rpx;
  105. }
  106. .btn-box {
  107. display: flex;
  108. justify-content: flex-end;
  109. view {
  110. padding: 4rpx 24rpx 4rpx 24rpx;
  111. border-radius: 150rpx;
  112. margin-left: 10rpx;
  113. }
  114. .cancell-box {
  115. color: #376cbb;
  116. border: 1rpx solid #376cbb;
  117. }
  118. .edit-box {
  119. color: #fff;
  120. background-color: #376cbb;
  121. }
  122. .reject-box {
  123. color: #d54941;
  124. border: 1rpx solid #d54941;
  125. }
  126. }
  127. }
  128. }
  129. }
  130. </style>