mirror of
https://github.com/zuiidea/antd-admin
synced 2026-10-21 23:23:43 +00:00
+9
-2
@@ -10,12 +10,19 @@ import NProgress from 'nprogress'
|
||||
const { prefix } = config
|
||||
|
||||
const { Header, Bread, Footer, Sider, styles } = Layout
|
||||
let lastHref
|
||||
|
||||
const App = ({ children, location, dispatch, app, loading }) => {
|
||||
const { user, siderFold, darkTheme, isNavbar, menuPopoverVisible, navOpenKeys } = app
|
||||
const href = window.location.href
|
||||
|
||||
NProgress.start()
|
||||
!loading.global && NProgress.done()
|
||||
if (lastHref !== href) {
|
||||
NProgress.start()
|
||||
if (!loading.global) {
|
||||
NProgress.done()
|
||||
lastHref = href
|
||||
}
|
||||
}
|
||||
|
||||
const headerProps = {
|
||||
menu,
|
||||
|
||||
Reference in New Issue
Block a user