1.5.5 • Published 8 months ago

vue-virt-list v1.5.5

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

vue-virt-list 虚拟列表 虚拟滚动列表 虚拟树

Documentation

To check out docs, visit vue-virt-list

👉 Advantages

Quick Start

npm install vue-virt-list -S

Options API

<template>
  <div style="width: 500px; height: 400px">
    <VirtList itemKey="id" :list="list" :minSize="20">
      <template #default="{ itemData, index }">
        <div>{{ index }} - {{ itemData.id }} - {{ itemData.text }}</div>
      </template>
    </VirtList>
  </div>
</template>

<script>
  import { VirtList } from 'vue-virt-list';
  export default {
    components: { VirtList },
    data() {
      return {
        list: [{ id: 0, text: 'text' }],
      };
    },
  };
</script>

Composition API

<template>
  <div style="width: 500px; height: 400px">
    <VirtList itemKey="id" :list="list" :minSize="20">
      <template #default="{ itemData, index }">
        <div>{{ index }} - {{ itemData.id }} - {{ itemData.text }}</div>
      </template>
    </VirtList>
  </div>
</template>

<script setup lang="ts">
  import { ref, shallowRef } from 'vue';
  import { VirtList } from 'vue-virt-list';
  const list = ref([{ id: 0, text: 'text' }]);

  // 大数据建议使用 shallowRef: https://keno-lee.github.io/vue-virt-list/guide/instructions#shallowref
  // const list = shallowRef([{ id: 0, text: 'text' }])
</script>

Sponsor

开源不易,如果帮助到你,请作者喝杯咖啡吧~

WeChat

有问题可扫码加好友进入技术交流群(备注github账号名)

1.5.5

8 months ago

1.5.4

8 months ago

1.5.3

8 months ago

1.5.2

9 months ago

1.5.1

9 months ago

1.5.0

9 months ago

1.2.0

1 year ago

1.1.0

1 year ago

1.4.3

10 months ago

1.4.2

10 months ago

1.4.1

11 months ago

1.3.2

1 year ago

1.4.0

12 months ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.1

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.3-beta.0

1 year ago

1.0.3-beta.1

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago