参考 :https://cloud.tencent.com/developer/ask/sof/243783
import { history, connect } from 'umi';
import styles from './index.less';
import Footer from '@/components/Footer';
const Leftsss =()=>{ // 内部组件不能用小写 命名,开头必须是大写!!!!!
return(
<>
<h1>w shi cuzpc</h1>
</>
)
}
const hobby =(leftsss:any)=>{
return(
<>
<div className={styles.layBody}>
<div className={styles.leftDive}>
<Leftsss /> // 使用
</div>
<div className={styles.rightDiv}></div>
</div>
<Footer />
</>
)
}
const hobbyPage =(state:any)=>{ // 连接 model 的
return state;
}
export default connect(hobbyPage)(hobby);