tangbc / vue-virtual-scroll-list

⚡️A vue component support big amount data list with high render performance and efficient.
https://tangbc.github.io/vue-virtual-scroll-list
MIT License
4.41k stars 592 forks source link

[Feature Request] Provide #before and #after slots for extra customization #405

Open cmitz opened 1 year ago

cmitz commented 1 year ago

Describe the feature request

The documentation doesn't specify this, but in the source code using a #default slot is clearly supported. I think it would be great if that was documented.

Example

<VirtualList
  data-key="id"
  :data-sources="epcisEvents"
  :data-component="EmptyComponent"
  :keeps="6"
>
  <template #before>
    <span>Something</span>
  </template>

  <template #item="{ index, item }">
    <MyComponent
      :list-item="item"
      @custom-listener
    />
  </template>
</VirtualList>