瀏覽代碼

更新 'README.md'

node 5 年之前
父節點
當前提交
c8a48fa1b7
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. 2
    2
      README.md

+ 2
- 2
README.md 查看文件

54
 
54
 
55
 ```jsx
55
 ```jsx
56
 // 单独使用 Editor
56
 // 单独使用 Editor
57
-<Editor value="xxx" onChange={(v) => console.log(v)} />
57
+<Editor value={this.state.value} onChange={(v) => this.setState({ value })} />
58
 
58
 
59
 // 不需要展示评论列表
59
 // 不需要展示评论列表
60
 
60
 
61
 <Comment type={1}  showList={false}>
61
 <Comment type={1}  showList={false}>
62
-  <Editor value="xxx" onChange={(v) => console.log(v)} />
62
+  <Editor value={this.state.value} onChange={(v) => this.setState({ value })} />
63
 </Comment>
63
 </Comment>
64
 
64
 
65
 ```
65
 ```