import React, { Component } from 'react'; import axios from 'axios'; import {Input,Pagination,Tooltip} from 'antd'; //业务组件 import CoursesBanner from "../coursesDetail/CoursesBanner"; import Coursesleftnav from "../coursesDetail/CoursesLeftNav"; class CourseLayoutcomponent extends Component{ constructor(props) { super(props) } componentDidMount(){ } // // getleftNavid=(navid,newselectnavid)=>{ // console.log(navid,newselectnavid) // this.setState({ // navkey:navid, // navttype:newselectnavid // }) // } render() { // 加 , ...this.props 样式会出现2份children const childrenWithProps = React.Children.map(this.props.children, child => { // debugger; if(!child) { return '' } return React.cloneElement(child, { ...this.state }) } ); // console.log("CoursesBanner") // console.log(this.props) return (
{/*头部banner*/}
{/*left_nav*/}
{/*right_concent*/}
{childrenWithProps}
) } } export default CourseLayoutcomponent;