layout.vue 399 B

123456789101112131415161718192021222324
  1. <template>
  2. <div v-for="card in cards">
  3. <CardTitle :title="card.title" :desc="card.desc"/>
  4. <CardItem
  5. v-for="item in card.child"
  6. v-bind="item"
  7. >
  8. </CardItem>
  9. </div>
  10. </template>
  11. <script setup>
  12. import CardTitle from './title.vue'
  13. import CardItem from './item.vue'
  14. defineProps({
  15. cards: {
  16. type: Array,
  17. default: () => {
  18. return []
  19. }
  20. }
  21. })
  22. </script>