Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vt-rn-pre-study
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
朱传永
vt-rn-pre-study
Commits
a016f833
Commit
a016f833
authored
Jan 27, 2021
by
zhuchuanyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: react-native-vector-icons
parent
5b4fbd10
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
11 deletions
+80
-11
App.tsx
App.tsx
+4
-7
StackNavigation.js
src/router/StackNavigation.js
+3
-1
index.js
src/router/index.js
+9
-1
Home.js
src/views/Home.js
+6
-2
IconPage.js
src/views/IconPage.js
+58
-0
No files found.
App.tsx
View file @
a016f833
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: zhuchuanyong
* @Author: zhuchuanyong
* @Date: 2021-01-22 15:13:57
* @Date: 2021-01-22 15:13:57
* @LastEditors: zhuchuanyong
* @LastEditors: zhuchuanyong
* @LastEditTime: 2021-01-27 1
1:25:08
* @LastEditTime: 2021-01-27 1
4:00:04
* @FilePath: \App.tsx
* @FilePath: \App.tsx
*/
*/
/**
/**
...
@@ -15,18 +15,15 @@
...
@@ -15,18 +15,15 @@
* @format
* @format
*/
*/
import
React
from
'react'
;
import
React
from
'react'
;
// import StackNavigation from './src/router/StackNavigation';
// import TabsNavigation from './src/router/TabsNavigation';
import
Navigation
from
'./src/router/index'
;
import
DrawerNavigation
from
'./src/router/DrawerNavigation'
;
declare
const
global
:
{
HermesInternal
:
null
|
{}};
declare
const
global
:
{
HermesInternal
:
null
|
{}};
const
App
=
()
=>
{
const
App
=
()
=>
{
return
(
return
(
<>
<>
{
/* <TabsNavigation /> */
}
<
Navigation
/>
{
/* <StackNavigation /> */
}
<
DrawerNavigation
/>
</>
</>
);
);
};
};
...
...
src/router/StackNavigation.js
View file @
a016f833
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: zhuchuanyong
* @Author: zhuchuanyong
* @Date: 2021-01-25 14:42:30
* @Date: 2021-01-25 14:42:30
* @LastEditors: zhuchuanyong
* @LastEditors: zhuchuanyong
* @LastEditTime: 2021-01-2
5 17:18:22
* @LastEditTime: 2021-01-2
7 13:56:19
* @FilePath: \src\router\StackNavigation.js
* @FilePath: \src\router\StackNavigation.js
*/
*/
...
@@ -12,6 +12,7 @@ import {createStackNavigator} from '@react-navigation/stack';
...
@@ -12,6 +12,7 @@ import {createStackNavigator} from '@react-navigation/stack';
import
Home
from
'../views/Home'
;
import
Home
from
'../views/Home'
;
import
Details
from
'../views/Details'
;
import
Details
from
'../views/Details'
;
import
IconPage
from
'../views/IconPage'
;
const
Stack
=
createStackNavigator
();
const
Stack
=
createStackNavigator
();
function
StackNavigation
()
{
function
StackNavigation
()
{
...
@@ -24,6 +25,7 @@ function StackNavigation() {
...
@@ -24,6 +25,7 @@ function StackNavigation() {
component
=
{
Home
}
component
=
{
Home
}
/
>
/
>
<
Stack
.
Screen
name
=
"Details"
component
=
{
Details
}
/
>
<
Stack
.
Screen
name
=
"Details"
component
=
{
Details
}
/
>
<
Stack
.
Screen
name
=
"IconPage"
component
=
{
IconPage
}
/
>
<
/Stack.Navigator
>
<
/Stack.Navigator
>
<
/NavigationContainer
>
<
/NavigationContainer
>
);
);
...
...
src/router/index.js
View file @
a016f833
...
@@ -2,6 +2,14 @@
...
@@ -2,6 +2,14 @@
* @Author: zhuchuanyong
* @Author: zhuchuanyong
* @Date: 2021-01-25 14:42:04
* @Date: 2021-01-25 14:42:04
* @LastEditors: zhuchuanyong
* @LastEditors: zhuchuanyong
* @LastEditTime: 2021-01-2
5 14:42:05
* @LastEditTime: 2021-01-2
7 14:05:17
* @FilePath: \src\router\index.js
* @FilePath: \src\router\index.js
*/
*/
import
React
from
'react'
;
import
StackNavigation
from
'./StackNavigation'
;
import
TabsNavigation
from
'./TabsNavigation'
;
import
DrawerNavigation
from
'./DrawerNavigation'
;
export
default
function
()
{
return
<
StackNavigation
/>
;
}
src/views/Home.js
View file @
a016f833
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
* @Author: zhuchuanyong
* @Author: zhuchuanyong
* @Date: 2021-01-25 14:44:12
* @Date: 2021-01-25 14:44:12
* @LastEditors: zhuchuanyong
* @LastEditors: zhuchuanyong
* @LastEditTime: 2021-01-2
5 17:45:19
* @LastEditTime: 2021-01-2
7 14:07:30
* @FilePath: \src\views\
h
ome.js
* @FilePath: \src\views\
H
ome.js
*/
*/
import
{
Button
}
from
'@ant-design/react-native'
;
import
{
Button
}
from
'@ant-design/react-native'
;
import
React
from
'react'
;
import
React
from
'react'
;
...
@@ -22,6 +22,10 @@ const Home = (props) => {
...
@@ -22,6 +22,10 @@ const Home = (props) => {
<
Button
type
=
"primary"
onPress
=
{()
=>
gotoDetail
()}
>
<
Button
type
=
"primary"
onPress
=
{()
=>
gotoDetail
()}
>
Home
Home
<
/Button
>
<
/Button
>
<
Button
type
=
"primary"
onPress
=
{()
=>
navigation
.
navigate
(
'IconPage'
)}
>
Icon
<
/Button
>
<
/
>
<
/
>
);
);
};
};
...
...
src/views/IconPage.js
0 → 100644
View file @
a016f833
/*
* @Author: zhuchuanyong
* @Date: 2021-01-27 13:51:34
* @LastEditors: zhuchuanyong
* @LastEditTime: 2021-01-27 14:55:07
* @FilePath: \src\views\iconpage.js
*/
import
React
from
'react'
;
import
{
View
,
Text
}
from
'react-native'
;
import
{
Card
,
WhiteSpace
,
WingBlank
,
Flex
}
from
'@ant-design/react-native'
;
import
AntIcon
from
'react-native-vector-icons/AntDesign'
;
import
Icon
from
'react-native-vector-icons/FontAwesome'
;
const
IconPage
=
()
=>
{
return
(
<
View
>
<
Card
>
<
Card
.
Header
title
=
"Antd 图标"
thumbStyle
=
{{
width
:
30
,
height
:
30
}}
extra
=
"福报"
/>
<
Card
.
Body
>
<
Flex
justify
=
"around"
>
<
AntIcon
name
=
"dingding"
size
=
{
30
}
color
=
"#1c7ed6"
/>
<
AntIcon
name
=
"github"
size
=
{
30
}
color
=
"#1c7ed6"
/>
<
AntIcon
name
=
"chrome"
size
=
{
30
}
color
=
"#1c7ed6"
/>
<
/Flex
>
<
/Card.Body
>
<
Card
.
Footer
content
=
"阿里里,阿里里,阿里阿里里"
extra
=
"<<老司机带带我>>"
/>
<
/Card
>
<
Card
>
<
Card
.
Header
title
=
"FontAwesome 图标"
thumbStyle
=
{{
width
:
30
,
height
:
30
}}
/
>
<
Card
.
Body
>
<
Flex
justify
=
"around"
>
<
Icon
name
=
"asl-interpreting"
size
=
{
30
}
color
=
"#63e6be"
/>
<
Icon
name
=
"rmb"
size
=
{
30
}
color
=
"#63e6be"
/>
<
Icon
name
=
"tripadvisor"
size
=
{
30
}
color
=
"#63e6be"
/>
<
Icon
name
=
"sign-language"
size
=
{
30
}
color
=
"#63e6be"
/>
<
/Flex
>
<
/Card.Body
>
<
Card
.
Footer
content
=
"阿里里,阿里里,阿里阿里里"
extra
=
"<<老司机带带我>>"
/>
<
/Card
>
<
/View
>
);
};
export
default
IconPage
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment