页面导入
This commit is contained in:
1 parent
e6ad3c414f
commit
6b1f17d6a8
47 files changed
+17802
-78
No files matched your search
@@ -4,10 +4,11 @@ import { Navigate, Route, Routes } from "react-router-dom";
|
||||
import { PageSidebar } from "@/components/page-sidebar";
|
||||
|
||||
import WorkspaceRoutes from "./WorkspaceRoutes";
|
||||
import StrategyRoutes from "./StrategyRoutes";
|
||||
import Header from "@/strategy-components/Header";
|
||||
|
||||
// 设为 true 时隐藏侧边栏(开发中,暂未完成)
|
||||
const SIDEBAR_ENABLED = false;
|
||||
const SIDEBAR_ENABLED = true;
|
||||
|
||||
function PageLayout() {
|
||||
const [collapsed, setCollapsed] = useState(false);
|
||||
@@ -38,6 +39,7 @@ function PageLayout() {
|
||||
/>
|
||||
}
|
||||
/>
|
||||
<Route path="strategy/*" element={<StrategyRoutes />} />
|
||||
</Routes>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import { Navigate, Route, Routes } from "react-router-dom";
|
||||
|
||||
import QA from "@/strategy-components/components/qa/QA";
|
||||
import GeneralQA from "@/strategy-components/components/qa/GeneralQA";
|
||||
import AgentQA from "@/strategy-components/components/qa/AgentQA";
|
||||
import CollaborativeQA from "@/strategy-components/components/qa/CollaborativeQA";
|
||||
import MopeChat from "@/strategy-components/components/qa/MopeChat";
|
||||
import TemplateEditor from "@/strategy-components/components/qa/TemplateEditor";
|
||||
|
||||
export default function StrategyRoutes() {
|
||||
return (
|
||||
<div className="h-full w-full overflow-hidden">
|
||||
<Routes>
|
||||
<Route index element={<Navigate to="qa/general" replace />} />
|
||||
|
||||
{/* 问答中心 */}
|
||||
<Route path="qa" element={<Navigate to="qa/general" replace />} />
|
||||
<Route path="qa/new" element={<QA initialMode="new" />} />
|
||||
<Route path="qa/general" element={<GeneralQA />} />
|
||||
<Route path="qa/agent" element={<AgentQA />} />
|
||||
<Route path="qa/multi-agent" element={<CollaborativeQA />} />
|
||||
<Route path="qa/mope" element={<MopeChat />} />
|
||||
<Route path="qa/template" element={<TemplateEditor />} />
|
||||
|
||||
<Route path="*" element={<Navigate to="qa/general" replace />} />
|
||||
</Routes>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user