el-menu如何拖动
时间: 2023-10-18 16:26:08 浏览: 112
vue2+el-menu实现路由跳转及当前项的设置方法实例
为了实现el-menu的拖动功能,我使用了vue.draggable.next这个基于Sortable.js的Vue 3兼容的拖放组件库。首先,我使用了组件递归的方法来实现无限级分类的菜单。然后,我在对应的节点上添加了自定义数据属性,以便在排序发生改变时执行onDragEnd方法。我还设置了group="peo",这样可以实现同名组件之间的拖拽。给el-menu组件绑定了v-model="scenes",这样就可以将该区域的数据与scenes变量进行绑定,实现拖拽效果。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [vue.draggable+el-menu 实现无限级菜单的拖拽](https://blog.csdn.net/CSDNDAN/article/details/130216428)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [el-menu配合vuedraggable实现拖拽功能](https://blog.csdn.net/qq_40011214/article/details/123688812)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文