import React, {Component} from 'react' import {Icon} from 'antd' import {TabBar} from 'antd-mobile' import Home from './pages/home' import Cart from './pages/cart' import My from './pages/my' class App extends Component { constructor(props) { super(props) this.state = { selectedTab: 'home', tabHidden: false } } changeTabBar = (tab, hidden) => { this.setState({ selectedTab: tab, tabHidden: hidden !== undefined ? hidden : false }) } render() { let {selectedTab, tabHidden} = this.state return (
) } } export default App const HomeUnselectedIcon = () => ( ) const HomeSelectedIcon = () => ( ) const CartUnselectedIcon = () => ( ) const CartSelectedIcon = () => ( ) const MyUnselectedIcon = () => (
) const MySelectedIcon = () => (
)