拖拽排序插件官网
var _this = this; var el = document.getElementById('rootChildDeparts'); _this.rootDepart.sortableObj = Sortable.create(el); _this.rootDepart.sortableObj.destroy(); //销毁排序 _this.rootDepart.sortableObj.cancel(); //网上说取消排序是这样,但是我试了试没效果
使用 toArray() 和 sort()