-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
50 lines (47 loc) · 1.41 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import React, {useState} from 'react';
import {
Text,
View,
} from 'react-native';
import {Icon, TabBar} from "@ant-design/react-native";
import Me from "./src/pages/Me";
import Login from "./src/pages/Login";
import Manage from "./src/pages/Manage";
import Home from "./src/pages/Home";
function App() {
const [currentView, setCurrentView] = useState("me");
return (
// <Login/>
<TabBar
unselectedTintColor="#949494"
tintColor="#33A3F4"
barTintColor="#f5f5f5"
>
<TabBar.Item
title="管理"
icon={<Icon name="ordered-list"/>}
onPress={()=>setCurrentView("manage")}
selected={currentView==="manage"}
>
<Manage content={""} age={18}/>
</TabBar.Item>
<TabBar.Item
title="主页"
icon={<Icon name="home"/>}
onPress={()=>setCurrentView("home")}
selected={currentView === "home"}
>
<Home/>
</TabBar.Item>
<TabBar.Item
title="我的"
icon={<Icon name="user"/>}
onPress={()=>setCurrentView("me")}
selected={currentView==="me"}
>
<Me age={18} content={"dddd"}/>
</TabBar.Item>
</TabBar>
);
}
export default App;