🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[TOC] ## 钙素 把值放入 ## 包含关系 ``` class Demo extends Component{ constructor(props) { super(props); } render() { return ( <div> <p>hello</p> {this.props.children} <p>hello</p> </div> ) } } class App extends Component{ constructor(props) { super(props); } render() { return( <div> <Demo> <h1>word</h1> </Demo> </div> ) } } ``` ## 槽 ``` class Demo extends Component{ constructor(props) { super(props); } render() { return ( <div> <p>hello</p> {this.props.left} <p>hello</p> {this.props.right} <p>hello</p> </div> ) } } class App extends Component{ constructor(props) { super(props); } render() { return( <div> 注意,使用了一个闭合标签 <Demo left={ <h1>leftleft</h1> } right={ <h1>rightright</h1> } /> </div> ) } } ```