你们可以告诉我如何解决它。
render:function(){ 回来(
< Pane label = "Account Setup"
subtitle = "Days 1 and 2"
liClass = "sports-setup-ico first-time-active ft-active-tab"
content = {
this.state.panes[0]
} >
< /Pane>
< Pane label = "Investments Purchase"
subtitle = "Approx. Day 3"
liClass = "sports-invest-ico"
content = {
this.state.panes[1]
} >
< /Pane>
< Pane label = "Balance and Portfolio"
subtitle = "Approx. Day 4"
liClass = "sports-balance-ico"
content = {
this.state.panes[2]
} >
< /Pane>
< Pane label = "IPerformance"
subtitle = "Approx. Day 5"
liClass = "sports-perf-ico"
content = {
this.state.panes[3]
} >
< /Pane> < /Tabs>
);
}
});
答案 0 :(得分:1)
在“不工作小提琴”中你有:
var Pane = React.createClass({
displayName: 'Pane',
propTypes: {
label: React.PropTypes.string.isRequired,
children: React.PropTypes.element.isRequired
},
render: function() {
return ( < div > {
this.props.children
} < /div>);
}
});
但仍尝试传递内容。在渲染方法或Pane类中将道具从children
更改为content
。