v-for.vue 410 B

1234567891011121314151617181920212223
  1. <template>
  2. <recycle-list for="item in longList" switch="type">
  3. <cell-slot case="A">
  4. <div v-for="panel in item.list" :key="panel.id">
  5. <text>{{panel.label}}</text>
  6. </div>
  7. </cell-slot>
  8. </recycle-list>
  9. </template>
  10. <script>
  11. module.exports = {
  12. data () {
  13. return {
  14. longList: [
  15. { type: 'A' },
  16. { type: 'A' }
  17. ]
  18. }
  19. }
  20. }
  21. </script>