feat: init

This commit is contained in:
2025-09-05 16:44:12 +08:00
parent 85244a451e
commit 242a15c589
27 changed files with 191 additions and 168 deletions

View File

@@ -1,5 +1,5 @@
import React from "react";
import { NavBar, SafeArea, TabBar, Toast } from "antd-mobile";
import { NavBar, SafeArea, Toast } from "antd-mobile";
import { useNavigate, useLocation } from "react-router-dom";
import { User, CattleZodiac } from "@icon-park/react";
import "./index.less";
@@ -13,39 +13,31 @@ interface MainLayoutProps {
const MainLayout: React.FC<MainLayoutProps> = ({ isShowNavBar, children, onLink, title }) => {
const navigate = useNavigate();
const location = useLocation();
const { pathname } = location;
const [activeKey, setActiveKey] = React.useState(pathname);
// const location = useLocation();
const setRouteActive = (value: string) => {
if (value !== "/") {
Toast.show("待开发");
}
};
// const tabs = [
// {
// key: "/",
// title: "宠物翻译",
// icon: <CattleZodiac />,
// },
// {
// key: "/set",
// title: "待办",
// icon: <User />,
// },
// {
// key: "/message",
// title: "消息",
// icon: <User />,
// },
// {
// key: "/me",
// title: "我的",
const tabs = [
{
key: "/",
title: "宠物翻译",
icon: <CattleZodiac />,
},
{
key: "/set",
title: "待办",
icon: <User />,
},
{
key: "/message",
title: "消息",
icon: <User />,
},
{
key: "/me",
title: "我的",
icon: <User size="24" />,
},
];
// icon: <User size="24" />,
// },
// ];
const goBack = () => {
if (onLink) {