-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update vue virtual scroll version and add virtual scroll props …
…and function build: build package test: fix scroll test build: build dist
- Loading branch information
Showing
28 changed files
with
13,345 additions
and
1,044 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# vue-draggable-virtual-scroll-list | ||
|
||
[![](https://github.com/p-baleine/vue-draggable-virtual-scroll-list/workflows/CI/badge.svg)]() | ||
|
||
|
||
# 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. | ||
|
||
![](images/screenshot.gif) | ||
|
||
# Usage | ||
|
||
``` html | ||
<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 | ||
<span class="spurious-link" target="LICENSE">*MIT License.*</span> | ||
[1]: https://github.com/p-baleine/vue-draggable-virtual-scroll-list/workflows/CI/badge.svg | ||
[SortableJS/Vue.Draggable]: https://github.com/SortableJS/Vue.Draggable | ||
[tangbc/vue-virtual-scroll-list]: https://github.com/tangbc/vue-virtual-scroll-list | ||
[./example/index.html]: ./example/index.html |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.