{"id":13672966,"url":"https://github.com/hejianxian/vddl","last_synced_at":"2026-01-24T11:44:38.307Z","repository":{"id":45795111,"uuid":"98948569","full_name":"hejianxian/vddl","owner":"hejianxian","description":"🦄 Vue components for modifying lists with the HTML5 drag \u0026 drop API. ","archived":false,"fork":false,"pushed_at":"2018-05-21T11:16:34.000Z","size":344,"stargazers_count":392,"open_issues_count":35,"forks_count":75,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-04-24T10:18:12.835Z","etag":null,"topics":["dnd","drag-and-drop","vue","vue-components","vue-dnd"],"latest_commit_sha":null,"homepage":"http://hejx.space/vddl","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hejianxian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-01T02:06:30.000Z","updated_at":"2024-03-19T14:49:38.000Z","dependencies_parsed_at":"2022-07-17T00:46:06.790Z","dependency_job_id":null,"html_url":"https://github.com/hejianxian/vddl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hejianxian%2Fvddl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hejianxian%2Fvddl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hejianxian%2Fvddl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hejianxian%2Fvddl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hejianxian","download_url":"https://codeload.github.com/hejianxian/vddl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251251823,"owners_count":21559666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dnd","drag-and-drop","vue","vue-components","vue-dnd"],"created_at":"2024-08-02T09:02:01.152Z","updated_at":"2026-01-24T11:44:38.249Z","avatar_url":"https://github.com/hejianxian.png","language":"Vue","funding_links":[],"categories":["Vue","UI组件","Components \u0026 Libraries","UI Components","UI Components [🔝](#readme)"],"sub_categories":["形成","UI Components","Form"],"readme":"\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://hejx.space/vddl\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/hejianxian/vddl/master/media/Vddl-400.png\" width=\"200\" alt=\"vddl\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  Vue components for modifying lists with the HTML5 drag \u0026 drop API.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://travis-ci.org/hejianxian/vddl\"\u003e\u003cimg alt=\"Travis Status\" src=\"https://img.shields.io/travis/hejianxian/vddl/master.svg?style=flat-square\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/vddl\"\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/vddl.svg?style=flat-square\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fhejianxian%2Fvddl?ref=badge_shield\" alt=\"FOSSA Status\"\u003e\u003cimg src=\"https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fhejianxian%2Fvddl.svg?type=shield\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## 💥Warning💥\n\n* 1. Don't set `index` to the `:key`, it will cause dragging confusion.\n\n```html\n\u003cvddl-list :list=\"list\"\u003e\n    \u003cvddl-draggable class=\"panel__body--item\" \n      v-for=\"(item, index) in list\" \n      :key=\"item.id\" // It's best to use a unique id. Remember, don't use 'index'.\n      ...\n      \u003e\n      {{item.label}}\n    \u003c/vddl-draggable\u003e\n\u003c/vddl-list\u003e\n```\n\n* 2. \"[Vue warn]: Duplicate keys detected: 'A-1'. This may cause an update error. \"\n\nWhy is this wrong? Because in Vue.js v2.5.0 version, The `nextTick`'s implementation has changed, specific can see [here](https://github.com/vuejs/vue/releases/tag/v2.5.0). The reason for throwing this error is that when the element is dropped onto the list, a duplicate object is inserted into the array. Now I think this can be done for you. Add a `drop` event to the `vddl-list` and add a `moved` event to the `vddl-draggable`. Then you need to splice the array manually. See the [demo source code](https://github.com/hejianxian/vddl/blob/master/example/src/views/simple.vue#L131-L144)\n\n## Links\n\n- [Documentation](http://hejx.space/vddl)\n- [Online Demo](http://hejx.space/vddl-demo)\n- [Vue drag\u0026drop lists](https://github.com/hejianxian/vue-drag-and-drop-list)\n\n## Features\n\n- Supports VueJs versions 1.0 and 2.0\n- Supports all modern browsers and Internet Explorer 9+\n- Supports nested lists for building trees and other fancy structures\n\n**Touch devices are not supported**, because they do not implement the HTML5 drag \u0026 drop standard. However, you can use a [shim](https://github.com/timruffles/ios-html5-drag-drop-shim) to make it work on touch devices as well.\n\n## Installation\n\n````bash\nnpm install --save vddl\n\n# or\nyarn add vddl\n````\n\n## Usage\n\n```js\nimport Vue from 'vue';\nimport Vddl from 'vddl';\n\nVue.use(Vddl);\n```\n\n## Development\n\n````bash\n# dev\nnpm install\nnpm run watch\n\n# build\nnpm run build\n\n# run example\ncd example \u0026\u0026 npm install\nnpm run dev\n````\n\n## License\n\nMIT\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fhejianxian%2Fvddl.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fhejianxian%2Fvddl?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhejianxian%2Fvddl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhejianxian%2Fvddl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhejianxian%2Fvddl/lists"}