2023-01-14 01:52:59 -05:00
|
|
|
import { BrowserRouter as Router, Route, Navigate , Routes } from 'react-router-dom';
|
|
|
|
import { Todo, Message, PersonalCenter, Bottom } from './pages/Bottom/index'
|
|
|
|
import { Home } from './pages/Home';
|
|
|
|
import './pages/Bottom/index.css'
|
2023-01-12 08:47:39 -05:00
|
|
|
import { NavBar, TabBar } from 'antd-mobile'
|
2023-01-11 07:28:49 -05:00
|
|
|
function App() {
|
|
|
|
return (
|
2023-01-12 06:39:51 -05:00
|
|
|
<Router>
|
2023-01-12 08:47:39 -05:00
|
|
|
<div className='app'>
|
|
|
|
<div className='top'>
|
|
|
|
<NavBar >配合路由使用</NavBar>
|
|
|
|
</div>
|
|
|
|
<div className='body'>
|
|
|
|
<Routes>
|
2023-01-14 01:52:59 -05:00
|
|
|
<Route path='/' element={<Navigate to="/home"/>}>
|
|
|
|
</Route>
|
2023-01-12 08:47:39 -05:00
|
|
|
<Route path='/home' element={<Home />}></Route>
|
|
|
|
<Route path='/todo' element={<Todo />}></Route>
|
|
|
|
<Route path='/message' element={<Message />}></Route>
|
|
|
|
<Route path='/me' element={<PersonalCenter />}></Route>
|
|
|
|
</Routes>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<Bottom />
|
|
|
|
</div>
|
2023-01-12 06:39:51 -05:00
|
|
|
</div>
|
|
|
|
</Router>
|
2023-01-11 07:28:49 -05:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default App;
|