card.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <template>
  2. <view>
  3. <cu-custom bgColor="bg-gradual-pink" :isBack="true"><block slot="backText">返回</block><block slot="content">卡片</block></cu-custom>
  4. <view class="cu-bar bg-white solid-bottom">
  5. <view class="action">
  6. <text class="cuIcon-titles text-orange"></text> 案例类卡片
  7. </view>
  8. <view class="action">
  9. <switch :class="isCard?'checked':''" :checked="isCard?true:false" @change="IsCard"></switch>
  10. </view>
  11. </view>
  12. <view class="cu-card case" :class="isCard?'no-card':''">
  13. <view class="cu-item shadow">
  14. <view class="image">
  15. <image src="https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg"
  16. mode="widthFix"></image>
  17. <view class="cu-tag bg-blue">史诗</view>
  18. <view class="cu-bar bg-shadeBottom"> <text class="text-cut">我已天理为凭,踏入这片荒芜,不再受凡人的枷锁遏制。我已天理为凭,踏入这片荒芜,不再受凡人的枷锁遏制。</text></view>
  19. </view>
  20. <view class="cu-list menu-avatar">
  21. <view class="cu-item">
  22. <view class="cu-avatar round lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg);"></view>
  23. <view class="content flex-sub">
  24. <view class="text-grey">正义天使 凯尔</view>
  25. <view class="text-gray text-sm flex justify-between">
  26. 十天前
  27. <view class="text-gray text-sm">
  28. <text class="cuIcon-attentionfill margin-lr-xs"></text> 10
  29. <text class="cuIcon-appreciatefill margin-lr-xs"></text> 20
  30. <text class="cuIcon-messagefill margin-lr-xs"></text> 30
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="cu-bar bg-white solid-bottom" :class="isCard?'margin-top':''">
  39. <view class="action">
  40. <text class="cuIcon-titles text-orange "></text> 动态类卡片
  41. </view>
  42. <view class="action">
  43. <switch :class="isCard?'checked':''" :checked="isCard?true:false" @change="IsCard"></switch>
  44. </view>
  45. </view>
  46. <view class="cu-card dynamic" :class="isCard?'no-card':''">
  47. <view class="cu-item shadow">
  48. <view class="cu-list menu-avatar">
  49. <view class="cu-item">
  50. <view class="cu-avatar round lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg);"></view>
  51. <view class="content flex-sub">
  52. <view>凯尔</view>
  53. <view class="text-gray text-sm flex justify-between">
  54. 2019年12月3日
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. <view class="text-content">
  60. 折磨生出苦难,苦难又会加剧折磨,凡间这无穷的循环,将有我来终结!
  61. </view>
  62. <view class="grid flex-sub padding-lr" :class="isCard?'col-3 grid-square':'col-1'">
  63. <view class="bg-img" :class="isCard?'':'only-img'" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg);"
  64. v-for="(item,index) in isCard?9:1" :key="index">
  65. </view>
  66. </view>
  67. <view class="text-gray text-sm text-right padding">
  68. <text class="cuIcon-attentionfill margin-lr-xs"></text> 10
  69. <text class="cuIcon-appreciatefill margin-lr-xs"></text> 20
  70. <text class="cuIcon-messagefill margin-lr-xs"></text> 30
  71. </view>
  72. <view class="cu-list menu-avatar comment solids-top">
  73. <view class="cu-item">
  74. <view class="cu-avatar round" style="background-image:url(https://ossweb-img.qq.com/images/lol/img/champion/Morgana.png);"></view>
  75. <view class="content">
  76. <view class="text-grey">莫甘娜</view>
  77. <view class="text-gray text-content text-df">
  78. 凯尔,你被自己的光芒变的盲目。
  79. </view>
  80. <view class="bg-grey padding-sm radius margin-top-sm text-sm">
  81. <view class="flex">
  82. <view>凯尔:</view>
  83. <view class="flex-sub">妹妹,你在帮他们给黑暗找借口吗?</view>
  84. </view>
  85. </view>
  86. <view class="margin-top-sm flex justify-between">
  87. <view class="text-gray text-df">2018年12月4日</view>
  88. <view>
  89. <text class="cuIcon-appreciatefill text-red"></text>
  90. <text class="cuIcon-messagefill text-gray margin-left-sm"></text>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. <view class="cu-item">
  96. <view class="cu-avatar round" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg);"></view>
  97. <view class="content">
  98. <view class="text-grey">凯尔</view>
  99. <view class="text-gray text-content text-df">
  100. 妹妹,如果不是为了飞翔,我们要这翅膀有什么用?
  101. </view>
  102. <view class="bg-grey padding-sm radius margin-top-sm text-sm">
  103. <view class="flex">
  104. <view>莫甘娜:</view>
  105. <view class="flex-sub">如果不能立足于大地,要这双脚又有何用?</view>
  106. </view>
  107. </view>
  108. <view class="margin-top-sm flex justify-between">
  109. <view class="text-gray text-df">2018年12月4日</view>
  110. <view>
  111. <text class="cuIcon-appreciate text-gray"></text>
  112. <text class="cuIcon-messagefill text-gray margin-left-sm"></text>
  113. </view>
  114. </view>
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. </view>
  120. <view class="cu-bar bg-white solid-bottom margin-top">
  121. <view class="action">
  122. <text class="cuIcon-titles text-orange "></text> 文章类卡片
  123. </view>
  124. <view class="action">
  125. <switch :class="isCard?'checked':''" :checked="isCard?true:false" @change="IsCard"></switch>
  126. </view>
  127. </view>
  128. <view class="cu-card article" :class="isCard?'no-card':''">
  129. <view class="cu-item shadow">
  130. <view class="title"><view class="text-cut">无意者 烈火焚身;以正义的烈火拔出黑暗。我有自己的正义,见证至高的烈火吧。</view></view>
  131. <view class="content">
  132. <image src="https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg"
  133. mode="aspectFill"></image>
  134. <view class="desc">
  135. <view class="text-content"> 折磨生出苦难,苦难又会加剧折磨,凡间这无穷的循环,将有我来终结!真正的恩典因不完整而美丽,因情感而真诚,因脆弱而自由!</view>
  136. <view>
  137. <view class="cu-tag bg-red light sm round">正义天使</view>
  138. <view class="cu-tag bg-green light sm round">史诗</view>
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. </template>
  146. <script>
  147. export default {
  148. data() {
  149. return {
  150. isCard: false
  151. };
  152. },
  153. methods: {
  154. IsCard(e) {
  155. this.isCard = e.detail.value
  156. },
  157. }
  158. }
  159. </script>
  160. <style>
  161. </style>