vuedraggable实现多级嵌套拖拽效果代码
代码语言:html
所属分类:拖放
代码描述:vuedraggable实现多级嵌套拖拽效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Vue Draggable Nested Example</title> <!-- 引入 Vue.js --> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui"> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue@2.6.1.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/Sortable-1-8-4.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vuedraggable.umd.2.20.0.js"></script> <style> body{ background: white; } .list-group { border: 1px solid #ccc; margin-bottom: 10px; padding: 5px; } .item { margin: 4px; padding: 5px; border: 1px solid #ccc; cursor: pointer; } </style> </head> <body> <div id="app"> <draggable class="list-group" v-model="nestedList" group="items" item-key="id" @change="logEvent"> <template v-for="item in nestedList"> .........完整代码请登录后点击上方下载按钮下载查看
网友评论0