这篇文章主要为大家详细介绍了vuejs2.0运用原生js实现简单拖拽元素功能,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
本文实例为大家分享了vuejs2
本文来源gao!%daima.com搞$代*!码$网3
.0实现简单拖拽元素功能的具体代码,供大家参考,具体内容如下
<title></title> .select-item { background-color: #5bc0de; display: inline-block; text-align: center; border-radius: 3px; margin-right: 10px; cursor:pointer; padding: 6px 20px; color: #fff; } .cursored{ cursor: default; } .project-content,.people-content { margin: 30px 50px; } .people-content { margin-top: 30px; } .drag-div { border: 1px solid #5bc0de; padding:10px; margin-bottom: 10px; width: 800px; cursor: pointer; } .select-project-item { display: inline-block; text-align: center; border-radius: 3px; } .drag-people-label{ margin-bottom:0; padding-right:10px; } [v-cloak]{ display:none; } <div class='drag-content' id="dragCon"> <div class='project-content'> <div class='select-item'>{{pjdt.name}}</div></div><div class='people-content'> <div class='drag-div'> <div class='select-project-item'> <label class='drag-people-label'>{{ppdt.name}}:</label></div></div></div></div>
实现
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持脚本之家。
以上就是vuejs2.0运用原生js实现简单拖拽元素功能的详细内容,更多请关注gaodaima搞代码网其它相关文章!