Home>Article>Web Front-end> How to use Vue to implement the drag and drop shuttle box function? Four ways to introduce
How to implement the drag and drop shuttle box function? The following article will introduce to you four ways to implement the drag and drop shuttle box function inVue. I hope it will be helpful to you.
[Related recommendations:vuejs video tutorial]
Click to open the video for more detailed explanation
Lazyload 按住拖动
拖拽穿梭框
{{ item.label }} X >{{ item.label }} X >
Rendering:
vuedraggableis standard Component encapsulation, and draggable elements are placed on
transition-group, and the transition animation is better.
How to use:
yarn add vuedraggable import vuedraggable from 'vuedraggable';When using it, you can bind local data in two directions through v-model. If you need to update or trigger an event monitored by the parent component, , you can emit it in updated().
Case:
{{ drag ? "拖拽中" : "拖拽停止" }} {{ element.name }}{{ color.text }}
Installation dependencies:
npm install awe-dnd --save yarn add awe-and
main.js
import VueDND from 'awe-dnd' Vue.use(VueDND)
Case:
(Learning video sharing:{{ color.text }}
web front-end development,Basic programming video)
The above is the detailed content of How to use Vue to implement the drag and drop shuttle box function? Four ways to introduce. For more information, please follow other related articles on the PHP Chinese website!