当识别类在网格元素中进行硬编码时,我的同位素过滤工作正常,但是当在ReactJS中使用jQuery Ajax调用呈现元素时,它无法运行,并且使用传递给它的props设置标识类按父组件。
当我对className="block hvr-reveal CategoryA "
进行硬编码时,它似乎工作得很好,但是当我通过道具传递它时,它却没有。
如果我在<p>
标记后面追加<img>
标记并显示{this.props.category}
,也会显示。
var Template = React.createClass({
render: function() {
return (
<div className="container text-center">
<div className="block hvr-reveal {this.props.category} " data-category={this.props.category} >
<img src={this.props.url}></img>
</div>
</div>
);
}
});