我对 react-dragula 库有问题https://github.com/bevacqua/react-dragula
我可以创建一列可拖动项目,但每列内的项目不能与其他列交换,它们只能在其列内拖动,那么我怎样才能使它们在其他列内可拖动?(提前谢谢)这是我的一列可拖动项目的代码
import React, {Component} from 'react';
import ProjectWidget from './ProjectWidget';
import Dragula from 'react-dragula';
class ProjectCol extends Component{
render(){
var dragulaDecorator = (componentBackingInstance) => {
if (componentBackingInstance) {
let options = { };
Dragula([componentBackingInstance], options);
}
};
return(
<div>
<div className="scrum_column_heading">To Do</div>
<div className="scrum_column">
<div id="scrum_column_todo" ref={dragulaDecorator} className="dragula dragula-vertical">
<ProjectWidget />
</div>
</div>
</div>
);
}
}
export default ProjectCol;
这是一起查看多列的代码
import React, {Component} from 'react';
import ProjectCol from './ProjectCol';
class ProjectList extends Component{
render(){
return (
<div class="scrum_board_overflow">
<div id="scrum_board" class="uk-clearfix">
<ProjectCol />
<ProjectCol />
<ProjectCol />
</div>
</div>
);
}
}
export default ProjectList;