我正在尝试通过对拖放和查找问题的反应来测试 Dragula。我收到错误消息:
未捕获的类型错误:react_dragula_1.default 不是函数
任何人都遇到过这个问题或解决问题的线索。
import * as React from "react";
import * as ReactDOM from 'react-dom';
import Dragula from 'react-dragula';
export class MultiPicklist extends React.Component {
render() {
return (<div className="swish-input-textarea">
<div className='parent'>
<div className='wrapper'>
<div id='left-defaults' className='container' ref={this.dragulaDecorator} >
<div>Element 0</div>
<div>Element 1</div>
<div>Element 2</div>
<div>Element 3</div>
</div>
<div id='right-defaults' className='container'>
<div>Element a</div>
<div>Element b</div>
<div>Element c</div>
<div>Element d</div>
<div>Element e</div>
</div>
</div>
</div>
</div>);
},
dragulaDecorator = (componentBackingInstance) => {
if (componentBackingInstance) {
let options = { };
console.log('componentBackingInstance');
console.log(componentBackingInstance);
Dragula([componentBackingInstance]);
}
};
}