Skip to content

Commit

Permalink
add backTop
Browse files Browse the repository at this point in the history
  • Loading branch information
zuiidea committed Nov 24, 2017
1 parent a3637b3 commit 6ba75de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/routes/app.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
/* global window */
/* global document */
import React from 'react'
import NProgress from 'nprogress'
import PropTypes from 'prop-types'
import pathToRegexp from 'path-to-regexp'
import { connect } from 'dva'
import { Layout, Loader } from 'components'
import { BackTop } from 'antd'
import { classnames, config } from 'utils'
import { Helmet } from 'react-helmet'
import { withRouter } from 'dva/router'
Expand Down Expand Up @@ -95,7 +97,8 @@ const App = ({ children, dispatch, app, loading, location }) => {
{!isNavbar ? <aside className={classnames(styles.sider, { [styles.light]: !darkTheme })}>
{siderProps.menu.length === 0 ? null : <Sider {...siderProps} />}
</aside> : ''}
<div className={styles.main}>
<div className={styles.main} id="mainContainer">
<BackTop target={() => document.getElementById('mainContainer')} />
<Header {...headerProps} />
<Bread {...breadProps} />
<div className={styles.container}>
Expand Down

0 comments on commit 6ba75de

Please sign in to comment.