Skip to content

Commit ea19c73

Browse files
committed
fix: fix reply box's style and clear content once successfully submitted
1 parent ec0c46e commit ea19c73

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/components/TopicDetail/index.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ class TopicDetail extends Component {
110110
}).then(res => {
111111
if (res.success) {
112112
this._fetchTopicDetail()
113+
this.setState({
114+
reply: ''
115+
})
113116
}
114117
})
115118
}
@@ -166,7 +169,7 @@ class TopicDetail extends Component {
166169
<p>添加评论</p>
167170
<div className="form">
168171
<textarea onChange={this.handleInput.bind(this)}></textarea>
169-
<button className="button button_info" onClick={this.submit.bind(this)}>提交</button>
172+
<div className="button button_info" onClick={this.submit.bind(this)}>提交</div>
170173
</div>
171174
</div>
172175
</div>

src/components/TopicDetail/topicDetail.less

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,5 +143,10 @@
143143
width: 100%;
144144
height: 140px;
145145
outline: none;
146+
border: none;
147+
resize: none;
148+
}
149+
.button {
150+
margin-top: 5px;
146151
}
147152
}

0 commit comments

Comments
 (0)