Leanote's Blog
I love Leanote!
Toggle navigation
Leanote's Blog
Home
Chrome
Git
Linux
Windows
Others
工具大全
VsCode
Expo
Html
JavaScript
Npm
Node
Mock
React-Native
React
TypeScript
小程序
插件
正则
Dva
Ant-Design-React
Umi
Vue
Vux
Ant-Design-Vue
Http
Java
flutter
开发小工具
About Me
Archives
Tags
Vue拖拽Draggable插件
2021-06-18 10:52:59
5
0
0
admin
> npm install vuedraggable ``` <template> <div> <!-- 调用组件 --> <draggable element="ul" v-model="listdata"> <li v-for="item in listdata">{{item.name}}</li> </draggable> <!-- 展示list数据效果 --> {{listdata}} </div> </template> <script> import draggable from 'vuedraggable' export default { name: 'draggabletest', components: { draggable, }, data () { return { listdata:[ { id: 1, name: '叶落森1' }, { id: 2, name: '叶落森2' }, { id: 3, name: '叶落森3' }, { id: 4, name: '叶落森4' }, { id: 5, name: '叶落森5' } ] } }, } </script> ```
Pre:
windows10常用功能设置
Next:
js常用工具函数
0
likes
5
Weibo
Wechat
Tencent Weibo
QQ Zone
RenRen
Submit
Sign in
to leave a comment.
No Leanote account?
Sign up now.
0
comments
More...
Table of content
No Leanote account? Sign up now.