我需要具有Vuetify树视图的自定义拖放功能。只需稍加修改即可在树视图代码中运行,但是可拖动事件未转发。
使用Vuedraggable,在渲染功能中添加以下代码
genChildrenWrapper() {
if (!this.isOpen || !this.children) return null;
const children = [this.children.map(this.genChild)];
return this.$createElement(
"draggable",
{
staticClass: "v-treeview-node__children",
attrs: {
group: "treeview"
}
},
children
);
},