hejianxian/vue-drag-and-drop-list
์๊ฐ
๐ด Vue directives for modifying lists with the HTML5 drag & drop API.
์น ๋ฐ ์ฑ ๊ฐ๋ฐ์ธก์ ๋ ์คํ ์ฆ๊ฐ
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +1
- in 1 month
- ๊ธฐ๋ก ์์ง ์ค
์๋ก ๊ฒน์น๋ ๊ธฐ๊ฐ์ ์์ฆ๊ฐ๋์ด๋ฉฐ ์ผ๋ณ ํฉ๊ณ๊ฐ ์๋๋๋ค. ์ธก์ ๊ฐ์ด ์์ผ๋ฉด ๋น์ ๋ก๋๋ค. ์คํ๋ ๊ด์ฌ๋๋ฅผ ๋ํ๋ด๋ฉฐ ํ์ง์ ๋ณด์ฅํ์ง ์์ต๋๋ค.
README.md
Originalvue-drag-and-drop-list 
Vue directives that allow you to build sortable lists with the native HTML5 drag & drop API. Supports nested lists for building trees and other fancy structures.
๐ฎ Now support 2.0, see vddl ๐๐
Demo
Not supported VueJS 2.0
In general, in 2.0 directives have a greatly reduced scope of responsibility: they are now only used for applying low-level direct DOM manipulations. In most cases, you should prefer using Components as the main code-reuse abstraction.
โ๏ธThis mean it should be a component. You can view vddl.
Supported browsers
IE9+ and all modern browsers are supported.
Touch devices are not supported, because they do not implement the HTML5 drag & drop standard. However, you can use a shim to make it work on touch devices as well.
Installation
npm install vue-drag-and-drop-list --save
or
yarn add vue-drag-and-drop-list
Usage
import Vue from 'vue';
import vueDragAndDropList from 'vue-drag-and-drop-list';
Vue.use(vueDragAndDropList);
or include as an inline script.
Required CSS styles
Both the dnd-list and it's children require relative positioning, so that the directive can determine the mouse position relative to the list and thus calculate the correct drop position.
ul[dnd-list], ul[dnd-list] > li {
position: relative;
}
Wiki
you should read the Vue directive doc first.
Development
npm install
npm run watch // rollup watch
npm run build //rollup -c
Run Demo
cd demo
// vue project
npm install
npm run dev // webpack
See all demos source code in 'views/*.vue' file.
Thanks
License
MIT
๊ด๋ จ ํ๋ก์ ํธ ์ดํด๋ณด๊ธฐ
๋ถ๋ฌ์ค๋ ์คโฆ