@gurinder/vue-sortable

1.0.2 • Public • Published

@gurinder/vue-sortable

Inspired by Adam Wathan https://www.youtube.com/watch?v=jR3R_m5FPRc

HTML

<ul slot-scope="{ items }">
    <vue-sortable-item v-for="(document, index) in items" :key="document.id">
        <li>
            <p v-tex="document.title"></p>

            <vue-sortable-handle>
                <button type="button" class="handle">button</button>
            </vue-sortable-handle>
        </li>
    </vue-sortable-item>
</ul>    

JS

import {SortableList, SortableItem, SortableHandle} from '@gurinder/vue-sortable'

Vue.components('sortable-list', SortableList);
Vue.components('sortable-item', SortableItem);
Vue.components('sortable-handle', SortableHandle);

Readme

Keywords

none

Package Sidebar

Install

npm i @gurinder/vue-sortable

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

13.7 kB

Total Files

12

Last publish

Collaborators

  • gurinder