|
@@ -143,6 +143,8 @@ var CommentItem = function (_Component) {
|
143
|
143
|
newContent = newContent.join("");
|
144
|
144
|
}
|
145
|
145
|
|
|
146
|
+ var imageList = images.split(",");
|
|
147
|
+
|
146
|
148
|
return _react2.default.createElement(
|
147
|
149
|
"div",
|
148
|
150
|
{ className: "comment-item-box" },
|
|
@@ -181,10 +183,12 @@ var CommentItem = function (_Component) {
|
181
|
183
|
__html: (0, _helper.renderContent)(this.renderTextWithReply(newContent, content))
|
182
|
184
|
}
|
183
|
185
|
}),
|
184
|
|
- _react2.default.createElement(
|
|
186
|
+
|
|
187
|
+ // image为空时不渲染comment-item-image
|
|
188
|
+ imageList.length > 0 && imageList[0] !== '' && _react2.default.createElement(
|
185
|
189
|
"div",
|
186
|
190
|
{ className: "comment-item-image" },
|
187
|
|
- images.split(",").map(function (item, index) {
|
|
191
|
+ imageList.map(function (item, index) {
|
188
|
192
|
return _react2.default.createElement("img", {
|
189
|
193
|
key: index,
|
190
|
194
|
src: item,
|