Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gaohuaxue-mobile-app
Project
Project
Details
Activity
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
chen
gaohuaxue-mobile-app
Commits
af6ca198
Commit
af6ca198
authored
Nov 24, 2022
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 重新引入Icons组件
parent
1ee66e56
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
39 additions
and
50 deletions
+39
-50
Item.tsx
src/components/Cell/Item.tsx
+8
-4
Item.tsx
src/components/Grid/Item.tsx
+6
-4
Spin.tsx
src/components/Loading/Spin.tsx
+2
-1
index.tsx
src/components/NoticeBar/index.tsx
+6
-15
index.tsx
src/components/Popup/index.tsx
+4
-8
index.tsx
src/components/Radio/index.tsx
+4
-4
index.tsx
src/components/Search/index.tsx
+6
-12
index.tsx
src/components/Shuttle/index.tsx
+3
-2
No files found.
src/components/Cell/Item.tsx
View file @
af6ca198
...
@@ -14,6 +14,7 @@ import {
...
@@ -14,6 +14,7 @@ import {
TextStyle
,
TextStyle
,
}
from
'react-native'
;
}
from
'react-native'
;
import
{
useTheme
}
from
'@react-navigation/native'
;
import
{
useTheme
}
from
'@react-navigation/native'
;
import
Icons
from
'react-native-vector-icons/AntDesign'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
{
ThemeStyle
}
from
'../../constants/theme'
;
import
{
ThemeStyle
}
from
'../../constants/theme'
;
import
styles
from
'./styles'
;
import
styles
from
'./styles'
;
...
@@ -159,12 +160,15 @@ const CellItem: React.FC<CellItemProps> = (props: CellItemProps) => {
...
@@ -159,12 +160,15 @@ const CellItem: React.FC<CellItemProps> = (props: CellItemProps) => {
<
View
style=
{
[
myStyle
[
'list-item-head'
],
customHeadStyle
]
}
>
<
View
style=
{
[
myStyle
[
'list-item-head'
],
customHeadStyle
]
}
>
{
icon
||
customIcon
?
(
{
icon
||
customIcon
?
(
<
View
style=
{
myStyle
[
'list-item-icon'
]
}
>
<
View
style=
{
myStyle
[
'list-item-icon'
]
}
>
{
/* {!customIcon ? (
{
!
customIcon
?
(
<Icons name={icon} size={iconSize} color={appTheme.fonts.black1} />
<
Icons
name=
{
icon
!
}
size=
{
iconSize
}
color=
{
appTheme
.
fonts
.
black1
}
/>
)
:
(
)
:
(
customIcon
customIcon
)} */
}
)
}
{
!
customIcon
?
null
:
customIcon
}
</
View
>
</
View
>
)
:
null
}
)
:
null
}
<
View
style=
{
myStyle
[
'list-item-titleWrap'
]
}
>
{
renderTitle
()
}
</
View
>
<
View
style=
{
myStyle
[
'list-item-titleWrap'
]
}
>
{
renderTitle
()
}
</
View
>
...
...
src/components/Grid/Item.tsx
View file @
af6ca198
import
React
from
'react'
;
import
React
from
'react'
;
import
{
View
,
Text
,
ViewStyle
,
TouchableOpacity
}
from
'react-native'
;
import
{
View
,
Text
,
ViewStyle
,
TouchableOpacity
}
from
'react-native'
;
import
Icons
from
'react-native-vector-icons/AntDesign'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
styles
from
'./styles'
;
import
styles
from
'./styles'
;
...
@@ -109,10 +110,11 @@ const GridItem: React.FC<GridItemProps> = (props: GridItemProps) => {
...
@@ -109,10 +110,11 @@ const GridItem: React.FC<GridItemProps> = (props: GridItemProps) => {
>
>
{
!
isHasChildren
&&
(
{
!
isHasChildren
&&
(
<
View
style=
{
myStyle
[
'grid-item-icon'
]
}
>
<
View
style=
{
myStyle
[
'grid-item-icon'
]
}
>
{
/* {!customRenderIcon ? (
{
!
customRenderIcon
?
(
<Icons name={icon} size={iconSize} />
<
Icons
name=
{
icon
!
}
size=
{
iconSize
}
/>
) : customRenderIcon} */
}
)
:
(
{
!
customRenderIcon
?
null
:
customRenderIcon
}
customRenderIcon
)
}
</
View
>
</
View
>
)
}
)
}
{
!
isHasChildren
&&
(
{
!
isHasChildren
&&
(
...
...
src/components/Loading/Spin.tsx
View file @
af6ca198
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
*/
*/
import
React
,
{
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useEffect
,
useRef
}
from
'react'
;
import
{
Animated
,
Easing
,
ViewStyle
}
from
'react-native'
;
import
{
Animated
,
Easing
,
ViewStyle
}
from
'react-native'
;
import
Icons
from
'react-native-vector-icons/AntDesign'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
styles
from
'./styles'
;
import
styles
from
'./styles'
;
...
@@ -68,7 +69,7 @@ const Spin: React.FC<IProps> = (props: IProps) => {
...
@@ -68,7 +69,7 @@ const Spin: React.FC<IProps> = (props: IProps) => {
},
},
]
}
]
}
>
>
{
/* <Icons name="loading2" size={size} color={color} /> */
}
<
Icons
name=
"loading2"
size=
{
size
}
color=
{
color
}
/>
</
Animated
.
View
>
</
Animated
.
View
>
);
);
};
};
...
...
src/components/NoticeBar/index.tsx
View file @
af6ca198
/* eslint-disable
no-undef
*/
/* eslint-disable
react-hooks/exhaustive-deps
*/
/*
/*
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2021-03-02 17:21:04
* @Date: 2021-03-02 17:21:04
...
@@ -14,6 +14,7 @@ import {
...
@@ -14,6 +14,7 @@ import {
ScrollView
,
ScrollView
,
LayoutChangeEvent
,
LayoutChangeEvent
,
}
from
'react-native'
;
}
from
'react-native'
;
import
Icons
from
'react-native-vector-icons/AntDesign'
;
import
themeColors
from
'../../constants/theme/colors'
;
import
themeColors
from
'../../constants/theme/colors'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
styles
from
'./styles'
;
import
styles
from
'./styles'
;
...
@@ -221,23 +222,18 @@ const NoticeBar: React.FC<NoticeBarProps> = (props: NoticeBarProps) => {
...
@@ -221,23 +222,18 @@ const NoticeBar: React.FC<NoticeBarProps> = (props: NoticeBarProps) => {
>
>
{
hasIcon
?
(
{
hasIcon
?
(
<
View
style=
{
myStyle
[
'boticeBar-icon'
]
}
>
<
View
style=
{
myStyle
[
'boticeBar-icon'
]
}
>
{
/*
<Icons
<
Icons
size=
{
16
}
size=
{
16
}
name=
{
icon
||
'sound'
}
name=
{
icon
||
'sound'
}
color=
{
PRESETS_COLOR_MAP
[
theme
][
0
]
}
color=
{
PRESETS_COLOR_MAP
[
theme
][
0
]
}
/>
*/
}
/>
</
View
>
</
View
>
)
:
null
}
)
:
null
}
</
View
>
</
View
>
<
View
style=
{
[
myStyle
[
'boticeBar-content'
]]
}
>
{
renderContent
()
}
</
View
>
<
View
style=
{
[
myStyle
[
'boticeBar-content'
]]
}
>
{
renderContent
()
}
</
View
>
{
hasArrow
?
(
{
hasArrow
?
(
<
TouchableOpacity
style=
{
[
myStyle
[
'boticeBar-action'
]]
}
>
<
TouchableOpacity
style=
{
[
myStyle
[
'boticeBar-action'
]]
}
>
{
/* <Icons
<
Icons
size=
{
16
}
name=
"right"
color=
{
PRESETS_COLOR_MAP
[
theme
][
0
]
}
/>
size={16}
// eslint-disable-next-line no-nested-ternary
name="right"
color={PRESETS_COLOR_MAP[theme][0]}
/> */
}
</
TouchableOpacity
>
</
TouchableOpacity
>
)
:
null
}
)
:
null
}
{
closable
?
(
{
closable
?
(
...
@@ -246,12 +242,7 @@ const NoticeBar: React.FC<NoticeBarProps> = (props: NoticeBarProps) => {
...
@@ -246,12 +242,7 @@ const NoticeBar: React.FC<NoticeBarProps> = (props: NoticeBarProps) => {
activeOpacity=
{
0.8
}
activeOpacity=
{
0.8
}
onPress=
{
handleClose
}
onPress=
{
handleClose
}
>
>
{
/* <Icons
<
Icons
size=
{
16
}
name=
"close"
color=
{
PRESETS_COLOR_MAP
[
theme
][
0
]
}
/>
size={16}
// eslint-disable-next-line no-nested-ternary
name="close"
color={PRESETS_COLOR_MAP[theme][0]}
/> */
}
</
TouchableOpacity
>
</
TouchableOpacity
>
)
:
null
}
)
:
null
}
</
TouchableOpacity
>
</
TouchableOpacity
>
...
...
src/components/Popup/index.tsx
View file @
af6ca198
...
@@ -16,6 +16,7 @@ import {
...
@@ -16,6 +16,7 @@ import {
StyleSheet
,
StyleSheet
,
TextStyle
,
TextStyle
,
}
from
'react-native'
;
}
from
'react-native'
;
import
Icons
from
'react-native-vector-icons/AntDesign'
;
import
Overlay
from
'../Overlay'
;
import
Overlay
from
'../Overlay'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
styles
from
'./styles'
;
import
styles
from
'./styles'
;
...
@@ -212,18 +213,13 @@ const Popup: React.FC<PopupProps> = (props: PopupProps) => {
...
@@ -212,18 +213,13 @@ const Popup: React.FC<PopupProps> = (props: PopupProps) => {
activeOpacity=
{
0.8
}
activeOpacity=
{
0.8
}
onPress=
{
handleCancel
}
onPress=
{
handleCancel
}
>
>
{
/* {
closeIcon === 'close' ? (
{
closeIcon
===
'close'
?
(
<
View
style=
{
myStyle
[
'popup-ship-close-icon'
]
}
>
<
View
style=
{
myStyle
[
'popup-ship-close-icon'
]
}
>
<
Icons
name=
{
closeIcon
}
size=
{
14
}
color=
"rgb(227, 228, 229)"
/>
<
Icons
name=
{
closeIcon
}
size=
{
14
}
color=
"rgb(227, 228, 229)"
/>
</
View
>
</
View
>
)
:
(
)
:
(
<Icons name={closeIcon} size={24} color="rgb(227, 228, 229)" />
<
Icons
name=
{
closeIcon
!
}
size=
{
24
}
color=
"rgb(227, 228, 229)"
/>
)} */
}
)
}
{
closeIcon
===
'close'
?
(
<
View
style=
{
myStyle
[
'popup-ship-close-icon'
]
}
>
{
/* <Icons name={closeIcon} size={14} color="rgb(227, 228, 229)" /> */
}
</
View
>
)
:
null
}
</
TouchableOpacity
>
</
TouchableOpacity
>
)
}
)
}
{
title
?
(
{
title
?
(
...
...
src/components/Radio/index.tsx
View file @
af6ca198
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
import
React
,
{
useContext
}
from
'react'
;
import
React
,
{
useContext
}
from
'react'
;
import
{
View
,
Text
,
StyleSheet
,
TouchableOpacity
}
from
'react-native'
;
import
{
View
,
Text
,
StyleSheet
,
TouchableOpacity
}
from
'react-native'
;
import
{
useTheme
}
from
'@react-navigation/native'
;
import
{
useTheme
}
from
'@react-navigation/native'
;
import
Icons
from
'react-native-vector-icons/AntDesign'
;
import
{
ThemeStyle
}
from
'../../constants/theme'
;
import
{
ThemeStyle
}
from
'../../constants/theme'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
RadioGroup
,
{
RadioContext
}
from
'./Group'
;
import
RadioGroup
,
{
RadioContext
}
from
'./Group'
;
...
@@ -22,7 +23,6 @@ interface RadioProps {
...
@@ -22,7 +23,6 @@ interface RadioProps {
/**
/**
* 选中颜色,默认主题色
* 选中颜色,默认主题色
*/
*/
// eslint-disable-next-line react/require-default-props
color
?:
string
;
color
?:
string
;
/**
/**
* 大小,默认22
* 大小,默认22
...
@@ -99,14 +99,14 @@ const Radio = (props: RadioProps) => {
...
@@ -99,14 +99,14 @@ const Radio = (props: RadioProps) => {
finalDisabled
?
myStyle
[
'radio-icon__disabled'
]
:
null
,
finalDisabled
?
myStyle
[
'radio-icon__disabled'
]
:
null
,
])
}
])
}
>
>
{
/*
<Icons
<
Icons
name=
"check"
name=
"check"
size={finalSize - 4}
size=
{
finalSize
!
-
4
}
color=
{
!
finalDisabled
?
'#FFFFFF'
:
'#c8c9cc'
}
color=
{
!
finalDisabled
?
'#FFFFFF'
:
'#c8c9cc'
}
style=
{
{
style=
{
{
opacity
:
isCheck
?
1
:
0
,
opacity
:
isCheck
?
1
:
0
,
}
}
}
}
/>
*/
}
/>
</
View
>
</
View
>
{
!!
children
&&
contentNode
}
{
!!
children
&&
contentNode
}
</
TouchableOpacity
>
</
TouchableOpacity
>
...
...
src/components/Search/index.tsx
View file @
af6ca198
/* eslint-disable react/require-default-props */
/*
/*
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2021-01-11 11:11:20
* @Date: 2021-01-11 11:11:20
...
@@ -15,6 +14,7 @@ import {
...
@@ -15,6 +14,7 @@ import {
Text
,
Text
,
}
from
'react-native'
;
}
from
'react-native'
;
import
{
useTheme
}
from
'@react-navigation/native'
;
import
{
useTheme
}
from
'@react-navigation/native'
;
import
Icons
from
'react-native-vector-icons/AntDesign'
;
import
{
ThemeStyle
}
from
'../../constants/theme'
;
import
{
ThemeStyle
}
from
'../../constants/theme'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
themeLayout
from
'../../constants/theme/layout'
;
import
themeLayout
from
'../../constants/theme/layout'
;
...
@@ -191,7 +191,7 @@ const Search: React.FC<SearchProps> = React.forwardRef(
...
@@ -191,7 +191,7 @@ const Search: React.FC<SearchProps> = React.forwardRef(
inputRef
.
current
!
.
blur
();
inputRef
.
current
!
.
blur
();
},
},
}),
}),
// eslint-disable-next-line react-hooks/exhaustive-deps
, array-bracket-spacing
// eslint-disable-next-line react-hooks/exhaustive-deps
[
inputRef
.
current
],
[
inputRef
.
current
],
);
);
...
@@ -215,18 +215,16 @@ const Search: React.FC<SearchProps> = React.forwardRef(
...
@@ -215,18 +215,16 @@ const Search: React.FC<SearchProps> = React.forwardRef(
>
>
{
!!
label
&&
<
Text
style=
{
myStyle
[
'search-label'
]
}
>
{
label
}
</
Text
>
}
{
!!
label
&&
<
Text
style=
{
myStyle
[
'search-label'
]
}
>
{
label
}
</
Text
>
}
<
View
style=
{
myStyle
[
'search-control'
]
}
>
<
View
style=
{
myStyle
[
'search-control'
]
}
>
{
/* {
!customLeftIcon ? (
{
!
customLeftIcon
?
(
<
Icons
<
Icons
type="feather"
name=
{
leftIcon
!
}
name={leftIcon}
size=
{
18
}
size=
{
18
}
color=
"#C0C4CC"
color=
"#C0C4CC"
style=
{
myStyle
[
'search-control-left-icon'
]
}
style=
{
myStyle
[
'search-control-left-icon'
]
}
/>
/>
)
:
(
)
:
(
customLeftIcon
customLeftIcon
)} */
}
)
}
{
!
customLeftIcon
?
null
:
customLeftIcon
}
<
View
style=
{
myStyle
[
'search-field-wrap'
]
}
>
<
View
style=
{
myStyle
[
'search-field-wrap'
]
}
>
<
TextInput
<
TextInput
ref=
{
inputRef
}
ref=
{
inputRef
}
...
@@ -260,11 +258,7 @@ const Search: React.FC<SearchProps> = React.forwardRef(
...
@@ -260,11 +258,7 @@ const Search: React.FC<SearchProps> = React.forwardRef(
style=
{
myStyle
[
'search-control-right-icon'
]
}
style=
{
myStyle
[
'search-control-right-icon'
]
}
onPress=
{
handleClear
}
onPress=
{
handleClear
}
>
>
{
/* <Icons
<
Icons
name=
"closecircle"
size=
{
18
}
color=
"#C0C4CC"
/>
name="closecircle"
size={18}
color="#C0C4CC"
/> */
}
</
TouchableOpacity
>
</
TouchableOpacity
>
)
}
)
}
</
View
>
</
View
>
...
...
src/components/Shuttle/index.tsx
View file @
af6ca198
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
*/
*/
import
React
from
'react'
;
import
React
from
'react'
;
import
{
TextStyle
,
TouchableOpacity
,
Text
}
from
'react-native'
;
import
{
TextStyle
,
TouchableOpacity
,
Text
}
from
'react-native'
;
import
Icons
from
'react-native-vector-icons/AntDesign'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
styles
from
'./styles'
;
import
styles
from
'./styles'
;
...
@@ -45,12 +46,12 @@ const Shuttle: React.FC<ShuttleProps> = (props: ShuttleProps) => {
...
@@ -45,12 +46,12 @@ const Shuttle: React.FC<ShuttleProps> = (props: ShuttleProps) => {
<
Text
style=
{
[
myStyle
[
'shuttle-describe'
],
customDescribeStyle
]
}
>
<
Text
style=
{
[
myStyle
[
'shuttle-describe'
],
customDescribeStyle
]
}
>
{
describe
}
{
describe
}
</
Text
>
</
Text
>
{
/*
<Icons
<
Icons
name=
"right"
name=
"right"
size=
{
12
}
size=
{
12
}
color=
"#C0C4CC"
color=
"#C0C4CC"
style=
{
customDescribeStyle
}
style=
{
customDescribeStyle
}
/>
*/
}
/>
</
TouchableOpacity
>
</
TouchableOpacity
>
);
);
};
};
...
...
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