hejianxian / vue-drag-and-drop-list

🐴 Vue directives for modifying lists with the HTML5 drag & drop API.
https://hejx.herokuapp.com/vue-dndl/#!/
MIT License
331 stars 54 forks source link

I got something wrong. #6

Closed jjljyn closed 7 years ago

jjljyn commented 7 years ago

Hi! Is there some easier simples?I'm a freshman and I got something wrong which i don't know why.Infect I just copied and pasted your code.Here is my code and debugs This is my Main.vue .

HTML:

List {{listName}}

  • {{item.label}}
  • Custom placeholder

SCRIPT:

   import Vue from 'vue';
   import vueDragAndDropList from 'vue-drag-and-drop-list';

   Vue.use(vueDragAndDropList);

   export default {
    name: 'Main',
    data() {
      return  {
        "selected": null,
        "lists": {
          "A": [
            {
              "label": "Item A1",
              "disable": false
            },
            {
              "label": "Item A2"
            },
            {
              "label": "Item A3"
            },
            {
              "label": "Item A4"
            }
          ],
          "B": [
            {
              "label": "Item B1"
            },
            {
              "label": "Item B2"
            },
            {
              "label": "Item B3"
            },
            {
              "label": "Item B4"
            }
          ]
        }
      }
    }
  }

DEBUGS:

screenshot
hejianxian commented 7 years ago

@jjljyn I'm sorry! it don't supported VueJS 2.0 😢

jjljyn commented 7 years ago

No wonder I got so many bugs.But I like your demo.It looks awesome. 👍

hejianxian commented 7 years ago

@jjljyn Thx!! 😃