温华: 配置stores终端缓存黑名单

This commit is contained in:
wenhua
2023-10-15 14:48:11 +08:00
parent 46f7756cec
commit 5b1de2c4b9
6 changed files with 44 additions and 33 deletions

View File

@@ -3,7 +3,8 @@ import './App.css'
import LayOut from './layout'
import ParentView from './ParentView'
import Loading from './Loading'
import currentRouter, { RouteInterception } from './router'
import currentRouter from './router'
import RouteInterception from './router/RouteInterception'
import { useDispatch, useSelector } from 'react-redux'
import { Suspense, lazy, useEffect, useState } from 'react'
const Views = import.meta.glob('./view/**/*.tsx')
@@ -27,7 +28,6 @@ const transferReactNode = (comp: string) => {
function App() {
const routes: [] = useSelector((store: any) => store.permission)
const [allRoutes, setAllRoutes] = useState(currentRouter)
const dispatch = useDispatch()
const element = useRoutes(allRoutes)
// 转换路由对象
const transferRouteObject = (routes: Array<any>) => {