我正在使用 react.js 和 bootstrap 构建一个应用程序以进行反应。我正在尝试创建一个带有“成功”类的表行。但是,在 react 中将属性“class”传递给 tr 标签不起作用,在翻译后的 HTML 中没有任何属性。
var Hello = React.createClass({
render: function() {
return <ReactBootstrap.Table bordered striped hover>
<thead><tr><th>name</th></tr></thead>
<tbody><tr class="success"><td>Jonas</td></tr></tbody>
</ReactBootstrap.Table>
}
});
相关 JSFiddle - http://jsfiddle.net/7pqrwfch/