Commit 6964f452 by zhanghaozhe

增加底部tab HOC

parent 66d2ccd1
import React, { Component } from 'react'
import Menu from '@/menu'
export default function WithTab(WrappedComponent) {
return class extends Component {
render() {
return(
<>
<WrappedComponent {...this.props}/>
<Menu/>
</>
)
}
}
}
\ No newline at end of file
export {default as WithTab} from './WithTab'
\ No newline at end of file
......@@ -3,6 +3,7 @@ import {Course} from '../../common'
import Scroll from './scroll'
import Topscroll from './topscroll'
import './index.scss';
import {WithTab} from '@/HOCs'
class Index extends Component {
state = {
......@@ -263,4 +264,4 @@ class Index extends Component {
}
export default Index;
export default WithTab(Index);
......@@ -39,7 +39,7 @@ const router = (props) => (
<Route path='/shopcard' component={ShopCard}></Route>
<Route path='/bargain-middle-page' component={BargainMiddlePage}></Route>
</Switch>
<Menu/>
{/*<Menu/>*/}
</Router>
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment