Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ProfileCardList.vue 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template lang="pug">
  2. section.profile-card-list.xs12.w-flex.column
  3. article
  4. ProfileCard.match-layout(
  5. :aspects='aspects'
  6. :card='card'
  7. :is-list='true'
  8. :key='`${card.pid}-${i}`'
  9. v-for='(card, i) in cards'
  10. )
  11. w-button.pa8.more-results(bg-color='primary' @click="loadMoreResults()")
  12. </template>
  13. <script setup>
  14. import { ref } from 'vue'
  15. import { cardAspects } from '../entities'
  16. import ProfileCard from './ProfileCard.vue'
  17. const aspects = ref(cardAspects)
  18. const emit = defineEmits(['loadMore'])
  19. const props = defineProps({
  20. cards: {
  21. type: [Object, Array],
  22. default: () => [
  23. {
  24. pid: '1',
  25. name: 'Full Name',
  26. avatar: 'https://hips.hearstapps.com/hmg-prod.s3.amazonaws.com/images/newborn-baby-boy-sleeping-peacefully-wearing-knit-royalty-free-image-1589459736.jpg?crop=0.669xw:1.00xh;0.228xw,0&resize=640:*',
  27. metadata: { age: '21', rawMetadata: 'Some Text Here!' },
  28. role: 'more filler',
  29. ethnicity: 'some background',
  30. },
  31. ],
  32. },
  33. })
  34. const loadMoreResults = () => { emit('loadMore') } // TODO update to scroll
  35. </script>
  36. <style lang="sass">
  37. .profile-card-list
  38. > header > .w-select >.primary
  39. margin-top: 0
  40. .more-results
  41. margin-bottom: 2em
  42. </style>