card.vue 6.6 KB

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