Commit aa92f3d6 by baiguangyao

路由以及底部选中状态优化

parent 378fbb62
import React, { Component } from 'react'
import { Link } from 'react-router'
import styles from './index.scss'
export default class NavLink extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<Link
{...rest}
to={pathUrl}
activeClassName={active}
className={styles.root}
>
<i className={icoName + ' ' + styles.ico} />
<span className={styles.text}>{linkName}</span>
</Link>
)
}
}
\ No newline at end of file
.root {
flex: auto;
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
align-items: center;
line-height: 1;
color: #666;
&:hover {
color: #1abc9c;
}
}
.ico {
font-size: 0.42rem;
display: block;
margin-bottom: 0.1rem;
}
.text {
display: block;
line-height: 1;
}
\ No newline at end of file
import React, { Component } from 'react'
import { Link } from 'react-router-dom';
import styles from './index.scss'
export default class NavLink extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<Link
{...rest}
to={pathUrl}
activeClassName={active}
className={styles.root}
>
<i className={icoName + ' ' + styles.ico} />
<span className={styles.text}>{linkName}</span>
</Link>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { Link } from 'react-router-dom';
import styles from './index.scss'
export default class NavLink extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<Link
{...rest}
to={pathUrl}
activeClassName={active}
className={styles.root}
>
<i className={icoName + ' ' + styles.ico} />
<span className={styles.text}>{linkName}</span>
</Link>
)
}
}
\ No newline at end of file
.root {
flex: auto;
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center;
align-items: center;
line-height: 1;
color: #666;
&:hover {
color: #0099ff;
}
}
.ico {
font-size: 0.42rem;
display: block;
margin-bottom: 0.1rem;
}
.text {
display: block;
line-height: 1;
}
\ No newline at end of file
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom';
import styles from './index.scss'
export default class NavLink extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<NavLink
{...rest}
to={pathUrl}
activeClassName={active}
className={styles.root}
>
<i className={icoName + ' ' + styles.ico} />
<span className={styles.text}>{linkName}</span>
</NavLink>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom';
import styles from './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<NavLink
{...rest}
to={pathUrl}
activeClassName={active}
className={styles.root}
>
<i className={icoName + ' ' + styles.ico} />
<span className={styles.text}>{linkName}</span>
</NavLink>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { Link } from 'react-router-dom';
import styles from './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<NavLink
{...rest}
to={pathUrl}
activeClassName={active}
className={styles.root}
>
<i className={icoName + ' ' + styles.ico} />
<span className={styles.text}>{linkName}</span>
</NavLink>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { Link } from 'react-router-dom';
import styles from './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<Link
{...rest}
to={pathUrl}
activeClassName={active}
className={styles.root}
>
<i className={icoName + ' ' + styles.ico} />
<span className={styles.text}>{linkName}</span>
</Link>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { Link } from 'react-router-dom';
import styles from './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<Link
to={pathUrl}
activeClassName={active}
className={styles.root}
>
<i className={icoName + ' ' + styles.ico} />
<span className={styles.text}>{linkName}</span>
</Link>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { Link } from 'react-router-dom';
import styles from './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName } = this.props;
return (
<Link
to={pathUrl}
activeClassName={active}
className={styles.root}
>
<i className={icoName + ' ' + styles.ico} />
<span className={styles.text}>{linkName}</span>
</Link>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { Link } from 'react-router-dom';
import styles from './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<Link
{...rest}
to={pathUrl}
activeClassName={active}
className={styles.root}
>
<i className={icoName + ' ' + styles.ico} />
<span className={styles.text}>{linkName}</span>
</Link>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom';
import styles from './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<NavLink
{...rest}
to={pathUrl}
activeClassName={active}
className={styles.root}
>
<i className={icoName + ' ' + styles.ico} />
<span className={styles.text}>{linkName}</span>
</NavLink>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom';
import styles from './index.scss'
export default class NavLinks extends Component {
render() {
const { pathUrl, active, icoName, linkName, ...rest } = this.props;
return (
<NavLink
{...rest}
to={pathUrl}
activeClassName={active}
className={styles.root}
>
<i className={icoName + ' ' + styles.ico} />
<span className={styles.text}>{linkName}</span>
</NavLink>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import NavLink from './NavLink'
import styles from './index.scss'
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '1.2rem' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
onlyActiveOnIndex
/>
<NavLink
pathUrl="/shop"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="好店"
/>
<NavLink
pathUrl="/coupon"
icoName="i-youhui42un"
active={styles.navThree}
linkName="优惠"
/>
<NavLink
pathUrl="/tour"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="周边"
/>
<NavLink
pathUrl="/user"
icoName="i-wode42un"
active={styles.navFive}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
.root {
background-color: #f5f5f5;
height: 1rem;
position: fixed;
z-index: 50;
bottom: 0;
left: 0;
width: 100%;
display: flex;
border-top: 1px solid #ccc;
}
.navOne, .navTwo, .navThree, .navFour, .navFive {
color: #1abc9c;
&:hover, &:active {
color: #1abc9c;
}
}
.navOne i:before {
content: "\e93d";
}
.navTwo i:before {
content: "\e917";
}
.navThree i:before {
content: "\e936";
}
.navFour i:before {
content: "\e939";
}
.navFive i:before {
content: "\e913";
}
\ No newline at end of file
import React, { Component } from 'react'
import NavLink from './NavLink'
import styles from './index.scss'
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '1.2rem' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
activeClassName
/>
<NavLink
pathUrl="/shop"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="好店"
/>
<NavLink
pathUrl="/coupon"
icoName="i-youhui42un"
active={styles.navThree}
linkName="优惠"
/>
<NavLink
pathUrl="/tour"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="周边"
/>
<NavLink
pathUrl="/user"
icoName="i-wode42un"
active={styles.navFive}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import NavLink from './NavLink'
import styles from './index.scss'
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '1.2rem' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
activeClassName={styles.navOne}
/>
<NavLink
pathUrl="/shop"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="好店"
/>
<NavLink
pathUrl="/coupon"
icoName="i-youhui42un"
active={styles.navThree}
linkName="优惠"
/>
<NavLink
pathUrl="/tour"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="周边"
/>
<NavLink
pathUrl="/user"
icoName="i-wode42un"
active={styles.navFive}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '1.2rem' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
activeClassName={styles.navOne}
/>
<NavLink
pathUrl="/shop"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="好店"
/>
<NavLink
pathUrl="/coupon"
icoName="i-youhui42un"
active={styles.navThree}
linkName="优惠"
/>
<NavLink
pathUrl="/tour"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="周边"
/>
<NavLink
pathUrl="/user"
icoName="i-wode42un"
active={styles.navFive}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '1.2rem' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
// activeClassName={styles.navOne}
/>
<NavLink
pathUrl="/shop"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="好店"
/>
<NavLink
pathUrl="/coupon"
icoName="i-youhui42un"
active={styles.navThree}
linkName="优惠"
/>
<NavLink
pathUrl="/tour"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="周边"
/>
<NavLink
pathUrl="/user"
icoName="i-wode42un"
active={styles.navFive}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '1.2rem' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/shop"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="好店"
/>
<NavLink
pathUrl="/coupon"
icoName="i-youhui42un"
active={styles.navThree}
linkName="优惠"
/>
<NavLink
pathUrl="/tour"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="周边"
/>
<NavLink
pathUrl="/user"
icoName="i-wode42un"
active={styles.navFive}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '1.2rem' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
icoName={"i-zhuye42un"}
active={'css'}
linkName="首页"
/>
<NavLink
pathUrl="/shop"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="好店"
/>
<NavLink
pathUrl="/coupon"
icoName="i-youhui42un"
active={styles.navThree}
linkName="优惠"
/>
<NavLink
pathUrl="/tour"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="周边"
/>
<NavLink
pathUrl="/user"
icoName="i-wode42un"
active={styles.navFive}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '1.2rem' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
icoName={"i-zhuye42un"}
active={'css'}
linkName="首页"
/>
<NavLink
pathUrl="/shop"
icoName="i-haodian42un"
// active={styles.navTwo}
linkName="好店"
/>
<NavLink
pathUrl="/coupon"
icoName="i-youhui42un"
// active={styles.navThree}
linkName="优惠"
/>
<NavLink
pathUrl="/tour"
icoName="i-zhoubian42un"
// active={styles.navFour}
linkName="周边"
/>
<NavLink
pathUrl="/user"
icoName="i-wode42un"
// active={styles.navFive}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '1.2rem' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/shop"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="好店"
/>
<NavLink
pathUrl="/coupon"
icoName="i-youhui42un"
active={styles.navThree}
linkName="优惠"
/>
<NavLink
pathUrl="/tour"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="周边"
/>
<NavLink
pathUrl="/user"
icoName="i-wode42un"
active={styles.navFive}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/shop"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="好店"
/>
<NavLink
pathUrl="/coupon"
icoName="i-youhui42un"
active={styles.navThree}
linkName="优惠"
/>
<NavLink
pathUrl="/tour"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="周边"
/>
<NavLink
pathUrl="/user"
icoName="i-wode42un"
active={styles.navFive}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
.root {
background-color: #f5f5f5;
height: 50px;
position: fixed;
z-index: 50;
bottom: 0;
left: 0;
width: 100%;
display: flex;
border-top: 1px solid #ccc;
}
.navOne, .navTwo, .navThree, .navFour, .navFive {
color: #1abc9c;
&:hover, &:active {
color: #1abc9c;
}
}
.navOne i:before {
content: "\e93d";
}
.navTwo i:before {
content: "\e917";
}
.navThree i:before {
content: "\e936";
}
.navFour i:before {
content: "\e939";
}
.navFive i:before {
content: "\e913";
}
\ No newline at end of file
.root {
background-color: #f5f5f5;
height: 50px;
position: fixed;
z-index: 50;
bottom: 0;
left: 0;
width: 100%;
display: flex;
}
.navOne, .navTwo, .navThree, .navFour, .navFive {
color: #1abc9c;
&:hover, &:active {
color: #1abc9c;
}
}
.navOne i:before {
content: "\e93d";
}
.navTwo i:before {
content: "\e917";
}
.navThree i:before {
content: "\e936";
}
.navFour i:before {
content: "\e939";
}
.navFive i:before {
content: "\e913";
}
\ No newline at end of file
.root {
height: 50px;
position: fixed;
z-index: 50;
bottom: 0;
left: 0;
width: 100%;
display: flex;
border-top: 1px solid #ccc;
}
.navOne, .navTwo, .navThree, .navFour, .navFive {
color: #1abc9c;
&:hover, &:active {
color: #1abc9c;
}
}
.navOne i:before {
content: "\e93d";
}
.navTwo i:before {
content: "\e917";
}
.navThree i:before {
content: "\e936";
}
.navFour i:before {
content: "\e939";
}
.navFive i:before {
content: "\e913";
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/shop"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/coupon"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/tour"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
activeClassName="active"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
exact
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<Redirect from="/" exact to="/index" />
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import { Redirect } from 'react-router-dom';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import { Redirect } from 'react-router-dom';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<Redirect from="/" exact to="/index" />
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import { Redirect } from 'react-router-dom';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
activeClassName="active"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
activeClassName="active"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
activeClassName="active"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
activeClassName="active"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
activeClassName="active"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
.root {
height: 50px;
position: fixed;
z-index: 50;
bottom: 0;
left: 0;
width: 100%;
display: flex;
border-top: 1px solid #ccc;
}
.navOne, .navTwo, .navThree, .navFour, .navFive {
color: #09f;
&:hover, &:active {
color: #1abc9c;
}
}
.navOne i:before {
content: "\e93d";
}
.navTwo i:before {
content: "\e917";
}
.navThree i:before {
content: "\e936";
}
.navFour i:before {
content: "\e939";
}
.navFive i:before {
content: "\e913";
}
\ No newline at end of file
.root {
height: 50px;
position: fixed;
z-index: 50;
bottom: 0;
left: 0;
width: 100%;
display: flex;
border-top: 1px solid #ccc;
}
.navOne, .navTwo, .navThree, .navFour, .navFive {
color: #09f;
&:hover, &:active {
color: #09f;
}
}
.navOne i:before {
content: "\e93d";
}
.navTwo i:before {
content: "\e917";
}
.navThree i:before {
content: "\e936";
}
.navFour i:before {
content: "\e939";
}
.navFive i:before {
content: "\e913";
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink exact to='/' pathUrl="/index"></NavLink>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
activeClassName="active"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
className="active"
activeClassName="active"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { PureComponent } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends PureComponent {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
exact
pathUrl="/"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
activeClassName="active"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
import Index from './components/Index';
import Classify from './components/classify';
import Study from './components/study';
import My from './components/my';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/index"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react';
import NavLink from './NavLink';
import styles from './index.scss';
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '50px' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
exact
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
/>
<NavLink
pathUrl="/classify"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="分类"
/>
<NavLink
pathUrl="/study"
icoName="i-youhui42un"
active={styles.navThree}
linkName="学习"
/>
<NavLink
pathUrl="/my"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import NavLink from './NavLink'
import styles from './index.scss'
export default class Nav extends Component {
render() {
return (
<div>
<div style={{ height: '1.2rem' }}></div>
<div className={styles.root}>
<NavLink
pathUrl="/"
icoName={"i-zhuye42un"}
active={styles.navOne}
linkName="首页"
onlyActiveOnIndex
/>
<NavLink
pathUrl="/shop"
icoName="i-haodian42un"
active={styles.navTwo}
linkName="好店"
/>
<NavLink
pathUrl="/coupon"
icoName="i-youhui42un"
active={styles.navThree}
linkName="优惠"
/>
<NavLink
pathUrl="/tour"
icoName="i-zhoubian42un"
active={styles.navFour}
linkName="周边"
/>
<NavLink
pathUrl="/user"
icoName="i-wode42un"
active={styles.navFive}
linkName="我的"
/>
</div>
</div>
)
}
}
\ No newline at end of file
// 底部路由
export { default as Nav } from './Nav'
\ No newline at end of file
import React from 'react';
import ReactDOM from 'react-dom';
import Router from './router';
// import { Provider } from 'react-redux';
import './styles/index.scss';
// import App from './App';
ReactDOM.render(
<Router />,
document.getElementById('root'));
\ No newline at end of file
...@@ -7,6 +7,8 @@ import Classify from './components/classify'; ...@@ -7,6 +7,8 @@ import Classify from './components/classify';
import Study from './components/study'; import Study from './components/study';
import My from './components/my'; import My from './components/my';
import './styles/index.scss'
const main = () => ( const main = () => (
<div style={{ backgroundColor: 'rgb(245, 245, 249)', textAlign: 'center' }}> <div style={{ backgroundColor: 'rgb(245, 245, 249)', textAlign: 'center' }}>
......
import React from 'react';
import { Switch, Route } from 'react-router-dom';
import Menu from './menu';
import Index from './components/Index';
import Classify from './components/classify';
import Study from './components/study';
import My from './components/my';
import './styles/index.scss';
const main = () => (
<div style={{ backgroundColor: 'rgb(245, 245, 249)', textAlign: 'center' }}>
<div>
<Switch>
<Route path='/index' component={Index}></Route>
<Route path='/classify' component={Classify}></Route>
<Route path='/study' component={Study}></Route>
<Route path='/my' component={My}></Route>
</Switch>
</div>
<Menu />
</div>
)
export default main;
\ No newline at end of file
import React from 'react';
import { Switch, Route } from 'react-router-dom';
import Menu from './menu';
import Index from './components/Index';
import Classify from './components/classify';
import Study from './components/study';
import My from './components/my';
import './styles/index.scss';
const main = () => (
<div style={{ backgroundColor: 'rgb(245, 245, 249)', textAlign: 'center' }}>
<div>
<Switch>
<Route path='/index' exact component={Index}></Route>
<Route path='/classify' component={Classify}></Route>
<Route path='/study' component={Study}></Route>
<Route path='/my' component={My}></Route>
</Switch>
</div>
<Menu />
</div>
)
export default main;
\ No newline at end of file
import React from 'react'
import { TabBar } from 'antd-mobile'
import { Link } from 'react-router-dom';
import { Nav} from './common'
class menu extends React.Component {
constructor(props) {
super(props);
this.state = {};
this.onPress = this.onPress.bind(this);
}
onPress(item) {
this.setState({ selected: item })
}
render(match) {
let { selected = 'index' } = this.state;
return (
<div className='tabbar' style={{ position: "fixed", width: "100%", bottom: 0 }}>
<TabBar>
<TabBar.Item
title="首页"
key="home"
icon={<Link to='/index'><i className='iconfont icon-youhuijuan tabbarIcon' >121212</i> </Link>}
selectedIcon={<Link to='/index'><i className='iconfont icon-youhuijuan selectedTabbarIcon' ></i> </Link>}
selected={selected === 'index' ? true : false}
onPress={() => { this.onPress('index') }}
/>
<TabBar.Item
title="分类"
key="classify"
icon={<Link to='/classify'><i className='iconfont icon-zhangdan-xianxing tabbarIcon' >121212</i></Link>}
selectedIcon={<Link to='/classify'><i className='iconfont icon-zhangdan-xianxing selectedTabbarIcon' ></i> </Link>}
selected={selected === 'classify' ? true : false}
onPress={() => { this.onPress('classify') }}
/>
<TabBar.Item
title="学习"
key="study"
icon={<Link to='/study'><i className='iconfont icon-zhangdan-xianxing tabbarIcon' >121212</i></Link>}
selectedIcon={<Link to='/study'><i className='iconfont icon-zhangdan-xianxing selectedTabbarIcon' ></i> </Link>}
selected={selected === 'study' ? true : false}
onPress={() => { this.onPress('study') }}
/>
<TabBar.Item
title="我的"
key="my"
icon={<Link to='/my'><i className='iconfont icon-yonghu-xianxing tabbarIcon' >121212</i></Link>}
selectedIcon={<Link to='/my'><i className='iconfont icon-yonghu-xianxing selectedTabbarIcon' ></i> </Link>}
selected={selected === 'my' ? true : false}
onPress={() => { this.onPress('my') }}
/>
</TabBar>
</div>
)
}
}
export default menu;
import React from 'react'
import { TabBar } from 'antd-mobile'
import { Link } from 'react-router-dom';
import { Nav} from './common'
class menu extends React.Component {
render(match) {
let { selected = 'index' } = this.state;
return (
<div className='tabbar' style={{ position: "fixed", width: "100%", bottom: 0 }}>
</div>
)
}
}
export default menu;
import React from 'react'
import { Nav} from './common'
class menu extends React.Component {
render(match) {
return (
<div className='tabbar' style={{ position: "fixed", width: "100%", bottom: 0 }}>
<Nav />
</div>
)
}
}
export default menu;
import React from 'react'
import { Nav} from './common'
class menu extends React.Component {
render(match) {
return (
<div className='tabbar' style={{ position: "fixed", width: "100%", bottom: 0 }}>
<Nav />
</div>
)
}
}
export default menu;
import React from 'react'
import { TabBar } from 'antd-mobile'
import { Nav} from './common'
class menu extends React.Component {
render(match) {
return (
<div className='tabbar' style={{ position: "fixed", width: "100%", bottom: 0 }}>
<Nav />
</div>
)
}
}
export default menu;
import React from 'react'
// import { TabBar } from 'antd-mobile'
import { Nav} from './common'
class menu extends React.Component {
render(match) {
return (
<div className='tabbar' style={{ position: "fixed", width: "100%", bottom: 0 }}>
<Nav />
</div>
)
}
}
export default menu;
import React from 'react'
// import { TabBar } from 'antd-mobile'
import { Nav} from './common'
class menu extends React.Component {
render(match) {
return (
<div className='tabbar' style={{ position: "fixed", width: "100%", bottom: 0 }}>
<Nav />
</div>
)
}
}
export default menu;
import React from 'react'
const { HashRouter, Route, NavLink } = 'react-router-dom';
// import { TabBar } from 'antd-mobile'
import { Nav} from './common'
class menu extends React.Component {
render(match) {
return (
<div className='tabbar' style={{ position: "fixed", width: "100%", bottom: 0 }}>
<Nav />
</div>
)
}
}
export default menu;
import React from 'react'
// import { TabBar } from 'antd-mobile'
import { Nav} from './common'
class menu extends React.Component {
render(match) {
return (
<div className='tabbar' style={{ position: "fixed", width: "100%", bottom: 0 }}>
<Nav />
</div>
)
}
}
export default menu;
import React from 'react'
import { Nav} from './common'
class menu extends React.Component {
render(match) {
return (
<div className='tabbar' style={{ position: "fixed", width: "100%", bottom: 0 }}>
<Nav />
</div>
)
}
}
export default menu;
import React from 'react'
import { Nav} from './common'
class menu extends React.Component {
render(match) {
return (
<div className='tabbar' style={{ position: "fixed", width: "100%", bottom: 0 }}>
<Nav />
</div>
)
}
}
export default menu;
import React from 'react'
import { Nav} from './common'
class menu extends React.Component {
render(match) {
return (
<div className='tabbar' style={{ position: "fixed", width: "100%", bottom: 0 }}>
<Nav />
</div>
)
}
}
export default menu;
import React from 'react'
import { HashRouter as Router, Route } from "react-router-dom";
import Main from './main'
const router = () => (
<Router>
<Route path='/' exact component={Main}>
</Route>
</Router>
)
export default router;
\ No newline at end of file
import React from 'react'
import { HashRouter as Router, Route } from "react-router-dom";
import Main from './main'
const router = () => (
<Route path='/' exact component={Main}>
</Route>
)
export default router;
\ No newline at end of file
import React from 'react'
import { HashRouter as Router, Route } from "react-router-dom";
import Main from './main'
const router = () => (
<Router>
<Route path='/' exact component={Main}>
</Route>
</Router>
)
export default router;
\ No newline at end of file
import React from 'react'
import { HashRouter as Router, Route } from "react-router-dom";
import Menu from './menu';
import Index from './components/Index';
import Classify from './components/classify';
import Study from './components/study';
import My from './components/my';
import './styles/index.scss';
import Main from './main'
const router = () => (
<Router>
<Route path='/' exact component={Main}>
</Route>
<Route path='/index' exact component={Index}></Route>
<Route path='/classify' component={Classify}></Route>
<Route path='/study' component={Study}></Route>
<Route path='/my' component={My}></Route>
</Router>
)
export default router;
\ No newline at end of file
import React from 'react'
import { HashRouter as Router, Route } from "react-router-dom";
// import Menu from './menu';
import Index from './components/Index';
import Classify from './components/classify';
import Study from './components/study';
import My from './components/my';
import './styles/index.scss';
import Main from './main'
const router = () => (
<Router>
<Route path='/' exact component={Main}>
</Route>
<Route path='/index' exact component={Index}></Route>
<Route path='/classify' component={Classify}></Route>
<Route path='/study' component={Study}></Route>
<Route path='/my' component={My}></Route>
</Router>
)
export default router;
\ No newline at end of file
import React from 'react'
import { HashRouter as Router, Route } from "react-router-dom";
import Main from './main'
const router = () => (
<Router>
<Route path='/' exact component={Main}>
</Route>
</Router>
)
export default router;
\ No newline at end of file
import React from 'react'
import { HashRouter as Router, Route } from "react-router-dom";
import Main from './main'
const router = () => (
<Router>
<Route path='/' component={Main}>
</Route>
</Router>
)
export default router;
\ No newline at end of file
import React from 'react'
// import { HashRouter as Router, Route } from "react-router-dom";
import { Switch, Route } from 'react-router-dom';
import Menu from './menu';
import Index from './components/Index';
import Classify from './components/classify';
import Study from './components/study';
import My from './components/my';
import './styles/index.scss';
import Main from './main'
const router = () => (
<Router>
<div style={{ backgroundColor: 'rgb(245, 245, 249)', textAlign: 'center' }}>
<div>
<Switch>
<Route path='/' component={Index}></Route>
<Route path='/index' exact component={Index}></Route>
<Route path='/classify' component={Classify}></Route>
<Route path='/study' component={Study}></Route>
<Route path='/my' component={My}></Route>
</Switch>
</div>
<Menu />
</div>
</Router>
)
export default router;
\ No newline at end of file
import React from 'react'
// import { HashRouter as Router, Route } from "react-router-dom";
import { Switch, Route } from 'react-router-dom';
import Menu from './menu';
import Index from './components/Index';
import Classify from './components/classify';
import Study from './components/study';
import My from './components/my';
import './styles/index.scss';
import Main from './main'
const router = () => (
<div style={{ backgroundColor: 'rgb(245, 245, 249)', textAlign: 'center' }}>
<div>
<Switch>
<Route path='/' component={Index}></Route>
<Route path='/index' exact component={Index}></Route>
<Route path='/classify' component={Classify}></Route>
<Route path='/study' component={Study}></Route>
<Route path='/my' component={My}></Route>
</Switch>
</div>
<Menu />
</div>
)
export default router;
\ No newline at end of file
import React from 'react'
// import { HashRouter as Router, Route } from "react-router-dom";
import { Switch, Route } from 'react-router-dom';
import Menu from './menu';
import Index from './components/Index';
import Classify from './components/classify';
import Study from './components/study';
import My from './components/my';
import './styles/index.scss';
// import Main from './main'
const router = () => (
<div style={{ backgroundColor: 'rgb(245, 245, 249)', textAlign: 'center' }}>
<div>
<Switch>
<Route path='/' component={Index}></Route>
<Route path='/index' exact component={Index}></Route>
<Route path='/classify' component={Classify}></Route>
<Route path='/study' component={Study}></Route>
<Route path='/my' component={My}></Route>
</Switch>
</div>
<Menu />
</div>
)
export default router;
\ No newline at end of file
import React from 'react'
// import { HashRouter as Router, Route } from "react-router-dom";
import { Switch, Route } from 'react-router-dom';
import Menu from './menu';
import Index from './components/Index';
import Classify from './components/classify';
import Study from './components/study';
import My from './components/my';
import './styles/index.scss';
// import Main from './main'
const router = () => (
<Router>
<div style={{ backgroundColor: 'rgb(245, 245, 249)', textAlign: 'center' }}>
<div>
<Switch>
<Route path='/' component={Index}></Route>
<Route path='/index' exact component={Index}></Route>
<Route path='/classify' component={Classify}></Route>
<Route path='/study' component={Study}></Route>
<Route path='/my' component={My}></Route>
</Switch>
</div>
<Menu />
</div>
</Router>
)
export default router;
\ No newline at end of file
import React from 'react'
// import { HashRouter as Router, Route } from "react-router-dom";
import { HashRouter as Router, Switch, Route } from 'react-router-dom';
import Menu from './menu';
import Index from './components/Index';
import Classify from './components/classify';
import Study from './components/study';
import My from './components/my';
import './styles/index.scss';
// import Main from './main'
const router = () => (
<Router>
<div style={{ backgroundColor: 'rgb(245, 245, 249)', textAlign: 'center' }}>
<div>
<Switch>
<Route path='/' component={Index}></Route>
<Route path='/index' exact component={Index}></Route>
<Route path='/classify' component={Classify}></Route>
<Route path='/study' component={Study}></Route>
<Route path='/my' component={My}></Route>
</Switch>
</div>
<Menu />
</div>
</Router>
)
export default router;
\ No newline at end of file
import React from 'react'
// import { HashRouter as Router, Route } from "react-router-dom";
import { HashRouter as Router, Switch, Route } from 'react-router-dom';
import Menu from './menu';
import Index from './components/Index';
import Classify from './components/classify';
import Study from './components/study';
import My from './components/my';
import './styles/index.scss';
// import Main from './main'
const router = () => (
<Router>
<div style={{ backgroundColor: 'rgb(245, 245, 249)', textAlign: 'center' }}>
<div>
<Switch>
<Route path='/' exact component={Index}></Route>
<Route path='/index' component={Index}></Route>
<Route path='/classify' component={Classify}></Route>
<Route path='/study' component={Study}></Route>
<Route path='/my' component={My}></Route>
</Switch>
</div>
<Menu />
</div>
</Router>
)
export default router;
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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