【发布时间】:2017-06-24 07:52:53
【问题描述】:
我想使用 React-Summernote 但它的类型不可用 我尝试执行以下操作
let ReactSummernote1: any = require('react-summernote');
let ReactSummernote = ReactSummernote1.ReactSummernote;
..
<ReactSummernote
value={this.props.content}
options={{
dialogsInBody: true,
toolbar: [
['style', ['style']],
['font', ['bold', 'italic', 'underline', 'clear']],
['fontname', ['fontname', 'fontsize', 'color']],
['para', ['ul', 'ol', 'paragraph']],
['insert', ['link', 'picture', 'table', 'hr']],
['view', ['codeview']]
]
}}
onChange={!this.props.scheduledSession ? this.props.contentUpdated : function () { } } />
但这会报错
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
【问题讨论】:
标签: javascript reactjs typescript typescript-typings summernote