vue-multiple-sortable

1.0.9 • Public • Published

vue-multiple-sortable

MIT License

You sorting to with multiple selected elements in your Vue.js application.

movie

Demo

https://sympe.github.io/vue-multiple-sortable-demo/dist/

Usage

Install

npm install --save vue-multiple-sortable

A Single File Component Example

<multiple-sortable :items="items" @drag="drag">
  <div slot="item" slot-scope="props">
      {{ ' 【' + props.obj.id + '】' +  props.obj.title }}
  </div>
</multiple-sortable>
 
<script>
import MultipleSortable from 'vue-multiple-sortable'
 
export default {
  components: {
    MultipleSortable
  },
  data: function () {
    return {
      items: [
        {
          obj: {
            id: 53,
            title: 'Michael'
          }
        },
        {
          obj: {
            id: 32,
            title: 'John'
          }
        },
        {
          obj: {
            id: 41,
            title: 'Daniel'
          }
        },
        {
          obj: {
            id: 29,
            title: 'Andrew'
          }
        }
      ]
    };
  },
  methods: {
    drag: function (items) {
      this.items = items;
    }
  }
};
</script> 

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i vue-multiple-sortable

Weekly Downloads

0

Version

1.0.9

License

MIT

Unpacked Size

2.69 MB

Total Files

14

Last publish

Collaborators

  • sympe