传入模板(children) 在组件中间写要传入的虚拟dom 在子组件中展示 {this.props.children} 比如想要传递一段代码到子组件里。 父组件Home.js:子组件Children3.js: 接受父组件里的代码,使用 this.props.children 相关文章: 2021-10-15 2022-12-23 2021-09-01 2021-09-21 2022-01-10 2021-11-01