警告:失败的道具类型:在“窗格”中未指定所需的道具“子项”.检查“首次时间选项卡”的呈现方法
Warning: Failed propType: Required prop `children` was not specified in `Pane`. Check the render method of `first-time-tab`
- 我是js的新手。
- 我有一个选项卡代码,可以正常工作。
- 我试图将我的代码集成到代码库中,但我收到警告......在小提琴代码和警告中提供它。
-
你们能告诉我如何解决它吗?
渲染: 函数(( { 返回 (
< 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> ); } });
在"不工作小提琴"中,你有:
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
。
相关文章:
- 使用select选项转换时间.使用javascript
- 如何在放大和缩小时间轴时在时间轴Vis.js上设置新选项
- 选项“;daysOfWeekDisabled”;在引导程序日期时间选择器中不起作用
- 更改选项显示当前时间
- 计算从打开选项卡到关闭选项卡的时间
- 表排序器从选择下拉菜单和自定义时间过滤器中选择多个选项
- 选择选项下拉菜单需要一些时间才能在 Chrome 中专门关闭
- JQuery 日期选择器 - 限制时间选项
- 是否可以跨选项卡检测空闲时间
- 如何动态设置日期时间选择器选项
- 时间间隔秒在选项卡更改的Javascript上快速运行
- 引导程序时间选择器未显示时间选择器选项
- 根据一天中的时间设置默认选项的选定值
- chrome setInterval()用于模糊选项卡无法正常工作,即使是1秒或更长时间
- 哪个javascript加载选项对页面加载时间的影响可以忽略不计
- 选项通过转换毫秒来显示PST中的时间
- 国际日期时间格式选项哈希:获取带有“2 位”的前导零
- 警告:失败的道具类型:在“窗格”中未指定所需的道具“子项”.检查“首次时间选项卡”的呈现方法
- 为什么我的工具提示的延迟时间选项不起作用?
- 引导响应选项卡显示一段时间后