|
@@ -1,18 +1,15 @@
|
|
-import { lazy, createSignal } from "solid-js";
|
|
|
|
-import { Routes, Route } from "solid-app-router";
|
|
|
|
|
|
+import { lazy } from "solid-js";
|
|
|
|
+import { Routes, Route , hashIntegration } from "solid-app-router";
|
|
|
|
|
|
|
|
|
|
-import baseText from "../base/baseText"
|
|
|
|
const BigScreen = lazy(() => import("../pages/BigScreen/Home"))
|
|
const BigScreen = lazy(() => import("../pages/BigScreen/Home"))
|
|
const CommonBigScreen = lazy(() => import("../pages/CommonBigScreen/Home"))
|
|
const CommonBigScreen = lazy(() => import("../pages/CommonBigScreen/Home"))
|
|
|
|
|
|
-const [BottomLi, setBottomLi] = createSignal(baseText.bottoms);
|
|
|
|
|
|
|
|
export default function localRouter() {
|
|
export default function localRouter() {
|
|
// 根据路由选择tab
|
|
// 根据路由选择tab
|
|
- setBottomLi(BottomLi().map(bot => (bot.path === location.pathname ? { ...bot, select: true } : { ...bot, select: false })));
|
|
|
|
return <>
|
|
return <>
|
|
- <Routes>
|
|
|
|
|
|
+ <Routes source={hashIntegration()}>
|
|
<Route path="/" element={<BigScreen />} />
|
|
<Route path="/" element={<BigScreen />} />
|
|
<Route path="/common" element={<CommonBigScreen />} />
|
|
<Route path="/common" element={<CommonBigScreen />} />
|
|
</Routes>
|
|
</Routes>
|