feat: init
This commit is contained in:
@@ -14,6 +14,7 @@ const Home = lazy(() => import("@/view/home"));
|
||||
const Page404 = lazy(() => import("@/view/error/page404"));
|
||||
const TranslateDetail = lazy(() => import("@/view/home/detail"));
|
||||
const TranslateMood = lazy(() => import("@/view/home/mood"));
|
||||
const TranslateArchives = lazy(() => import("@/view/home/archives"));
|
||||
export const routes: AppRoute[] = [
|
||||
{
|
||||
path: "/",
|
||||
@@ -40,5 +41,13 @@ export const routes: AppRoute[] = [
|
||||
title: "情绪监控",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/translate/archives",
|
||||
element: <TranslateArchives />,
|
||||
auth: false,
|
||||
meta: {
|
||||
title: "宠物档案",
|
||||
},
|
||||
},
|
||||
{ path: "*", element: <Page404 />, auth: false },
|
||||
];
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
// 档案
|
||||
import MainLayout from "@/layout/main/mainLayout";
|
||||
import "./index.less";
|
||||
|
||||
function Index() {
|
||||
return (
|
||||
<MainLayout isShowNavBar={true}>
|
||||
<div className="archives"></div>
|
||||
</MainLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export default Index;
|
||||
@@ -0,0 +1,3 @@
|
||||
.archives {
|
||||
padding: 12px;
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
// 档案
|
||||
import MainLayout from "@/layout/main/mainLayout";
|
||||
import "./index.less";
|
||||
import styles from "./index.module.less";
|
||||
|
||||
function Index() {
|
||||
return (
|
||||
<MainLayout isShowNavBar={true}>
|
||||
<div className="archives"></div>
|
||||
<MainLayout isShowNavBar={true} title="宠物档案">
|
||||
<div className={styles.archives}>档案</div>
|
||||
</MainLayout>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ function Index() {
|
||||
const [visible, setVisible] = useState<boolean>(false);
|
||||
const navigate = useNavigate();
|
||||
|
||||
const onLink = () => {
|
||||
navigate("/translate/mood");
|
||||
const onLink = (link: string) => {
|
||||
navigate(link);
|
||||
};
|
||||
return (
|
||||
<MainLayout>
|
||||
@@ -26,9 +26,15 @@ function Index() {
|
||||
fill="#333"
|
||||
strokeWidth={3}
|
||||
strokeLinecap="butt"
|
||||
onClick={onLink}
|
||||
onClick={() => onLink("/translate/mood")}
|
||||
/>
|
||||
<GithubOne
|
||||
theme="outline"
|
||||
fill="#333"
|
||||
strokeWidth={3}
|
||||
strokeLinecap="butt"
|
||||
onClick={() => onLink("/translate/archives")}
|
||||
/>
|
||||
<GithubOne theme="outline" fill="#333" strokeWidth={3} strokeLinecap="butt" />
|
||||
</Space>
|
||||
</div>
|
||||
<Translate searchVisible={visible} />
|
||||
|
||||
Reference in New Issue
Block a user