card.vue 910 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <view class="k-card-">
  3. <!-- <view class="p-20 f-30 t-bold c-g-primary-l">{{title}}</view>
  4. <u-cell-group>
  5. <u-cell v-for="(item, index) in list" :key="index" :title="item.value" isLink/>
  6. </u-cell-group> -->
  7. <view class="f-36 t-bold m-t-20">{{title}}</view>
  8. <view class="k-card-plain-p m-t-10" v-for="(item,index) in list" :key="index">
  9. <u-cell is-link :border="false" :title="item.value" @click="clickCell(item)"/>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. props: {
  16. title: String,
  17. list: Array,
  18. },
  19. data() {
  20. return {
  21. }
  22. },
  23. methods: {
  24. clickCell(item) {
  25. this.$emit("click", item)
  26. }
  27. },
  28. }
  29. </script>
  30. <style>
  31. .k-card {
  32. display: flex;
  33. flex-direction: column;
  34. /* align-items: center; */
  35. width: 100%;
  36. /* padding-top: 20rpx; */
  37. /* padding-bottom: 20rpx; */
  38. /* margin-left: 5rpx; */
  39. /* margin-right: 5rpx; */
  40. border-radius: 10rpx;
  41. overflow: hidden;
  42. }
  43. </style>