import React ,{FC} from "react"; import { NavBar, TabBar } from 'antd-mobile' import { Route,Routes, useLocation, MemoryRouter as Router, useNavigate, } from 'react-router-dom' import { AppOutline, MessageOutline, UnorderedListOutline, UserOutline, } from 'antd-mobile-icons' export function Bottom (){ const navigate = useNavigate(); const location = useLocation() const { pathname } = location const setRouteActive = (value) => { navigate(value) } const tabs = [ { key: '/home', title: '首页', icon: , badge: '1', }, { key: '/todo', title: '待办', icon: , badge: '2', }, { key: '/message', title: '消息', icon: , badge: '3', }, { key: '/me', title: '我的', icon: , badge: '4', }, ] return ( setRouteActive(value)}> {tabs.map(item => ( ))} ) } export function Todo() { return
待办
} export function Message() { return
消息
} export function PersonalCenter() { return
我的
}