0.0.15 โ€ข Published 3 years ago

vue-draggable-virtual-scroll-list v0.0.15

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

vue-draggable-virtual-scroll-list

npm.io

Description

๐Ÿ”Œ SortableJS/Vue.Draggable + โšก tangbc/vue-virtual-scroll-list = ๐Ÿ’กโœจ

Vue component who put SortableJS/Vue.Draggable and tangbc/vue-virtual-scroll-list together and allow drag-and-drop and big amount data list with high scroll performance.

npm.io

Usage

<div id="main">
  <draggable-virtual-list
    class="phrase-list"
    v-model="items"
    :size="50"
    :keeps="20"
    :data-key="'id'"
    :data-sources="items"
    :data-component="Item"
  >
  </draggable-virtual-list>
</div>

<script>
const Item = {
  props: {
    source: {
      type: Object,
      default () {
        return {}
      },
    },
  },
  template: `
    <div class="phrase" :key="source.id">
      {{ source.content }}
    </div>
  `
}

new Vue({
  el: '#main',
  components: {
    DraggableVirtualList,
  },
  data() {
    return {
      items: [
        { source: { id: 1, content: 'hello' } },
        { source: { id: 2, content: world' } },
        // ...
      ],
      Item
    }
  },
})
</script>

Please see ./example/index.html.

License

MIT License.

0.0.15

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago