Browse Source

回滚hash路由

main
李金 5 months ago
parent
commit
7518281f5b
  1. 6
      src/routes.tsx

6
src/routes.tsx

@ -20,7 +20,7 @@ import {
Outlet,
redirect,
RouterProvider,
createHashHistory,
// createHashHistory,
} from '@tanstack/react-router'
// import { TanStackRouterDevtools } from '@tanstack/router-devtools'
import { memo, useEffect, useRef } from 'react'
@ -302,11 +302,11 @@ export const RootProvider = memo((props: { context: Partial<IRootContext> }) =>
generateDynamicRoutes(menuData ?? [], layoutAuthRoute)
const hashHistory = createHashHistory()
// const hashHistory = createHashHistory()
const router = createRouter({
routeTree,
history: hashHistory,
// history: hashHistory,
context: { queryClient, menuData: [] },
defaultPreload: 'intent',
defaultPendingComponent: () => <Loading loading={true} delay={300}/>

Loading…
Cancel
Save