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
cce1f4a6
Commit
cce1f4a6
authored
Nov 23, 2022
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 去掉god-mobile引入
parent
a93f53f7
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
212 additions
and
31 deletions
+212
-31
Item.tsx
src/components/Cell/Item.tsx
+4
-2
Item.tsx
src/components/Grid/Item.tsx
+3
-3
index.tsx
src/components/ImageBox/index.tsx
+95
-0
styles.ts
src/components/ImageBox/styles.ts
+7
-0
index.tsx
src/components/LazyImage/index.tsx
+75
-0
Spin.tsx
src/components/Loading/Spin.tsx
+1
-2
index.tsx
src/components/Loading/index.tsx
+1
-3
index.tsx
src/components/NoticeBar/index.tsx
+6
-7
index.tsx
src/components/Popup/index.tsx
+7
-3
index.tsx
src/components/Radio/index.tsx
+2
-3
index.tsx
src/components/Search/index.tsx
+8
-4
index.tsx
src/components/Shuttle/index.tsx
+3
-4
No files found.
src/components/Cell/Item.tsx
View file @
cce1f4a6
...
...
@@ -7,7 +7,6 @@
*/
import
React
from
'react'
;
import
{
View
,
Text
,
TouchableOpacity
,
ViewStyle
,
TextStyle
}
from
'react-native'
;
import
{
Icons
}
from
'@linkseeks/god-mobile'
;
import
{
useTheme
}
from
'@react-navigation/native'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
{
ThemeStyle
}
from
'../../constants/theme'
;
...
...
@@ -149,10 +148,13 @@ const CellItem: React.FC<CellItemProps> = (props: CellItemProps) => {
>
{
(
icon
||
customIcon
)
?
(
<
View
style=
{
myStyle
[
'list-item-icon'
]
}
>
{
!
customIcon
?
(
{
/* {
!customIcon ? (
<Icons name={icon} size={iconSize} color={appTheme.fonts.black1} />
) : (
customIcon
)} */
}
{
!
customIcon
?
null
:
(
customIcon
)
}
</
View
>
)
:
null
}
...
...
src/components/Grid/Item.tsx
View file @
cce1f4a6
import
React
from
'react'
;
import
{
View
,
Text
,
ViewStyle
,
TouchableOpacity
}
from
'react-native'
;
import
{
Icons
}
from
'@linkseeks/god-mobile'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
styles
from
'./styles'
;
...
...
@@ -111,9 +110,10 @@ const GridItem: React.FC<GridItemProps> = (props: GridItemProps) => {
>
{
!
isHasChildren
&&
(
<
View
style=
{
myStyle
[
'grid-item-icon'
]
}
>
{
!
customRenderIcon
?
(
{
/* {
!customRenderIcon ? (
<Icons name={icon} size={iconSize} />
)
:
customRenderIcon
}
) : customRenderIcon} */
}
{
!
customRenderIcon
?
null
:
customRenderIcon
}
</
View
>
)
}
{
!
isHasChildren
&&
(
...
...
src/components/ImageBox/index.tsx
0 → 100755
View file @
cce1f4a6
import
React
,
{
useState
}
from
'react'
import
{
View
,
ViewStyle
,
Modal
,
TouchableOpacity
,
GestureResponderEvent
,
ImageResizeMode
}
from
'react-native'
import
ImageViewer
from
'react-native-image-zoom-viewer'
import
{
IImageInfo
}
from
'react-native-image-zoom-viewer/built/image-viewer.type'
import
LazyImage
from
'../LazyImage'
import
defaultImg
from
'../../../assets/images/default_img.png'
import
styles
from
'./styles'
interface
ImageBoxPropsType
{
width
?:
number
|
string
;
height
?:
number
|
string
;
source
:
string
;
style
?:
ViewStyle
;
resizeMode
?:
ImageResizeMode
;
borderRadius
?:
number
,
canPreview
?:
boolean
,
onPress
?:
((
event
:
GestureResponderEvent
)
=>
void
)
|
undefined
}
const
ImageBox
=
(
props
:
ImageBoxPropsType
)
=>
{
const
{
width
,
height
,
source
=
""
,
style
,
borderRadius
,
resizeMode
=
'contain'
,
canPreview
,
onPress
}
=
props
const
[
previewVisible
,
setPreviewVisible
]
=
useState
<
boolean
>
(
false
)
const
showImgBg
=
()
=>
{
if
(
canPreview
&&
onPress
)
{
return
(
<
TouchableOpacity
activeOpacity=
{
1
}
style=
{
{
width
,
height
,
borderRadius
,
overflow
:
'hidden'
}
}
onPress=
{
(
e
:
GestureResponderEvent
)
=>
{
if
(
canPreview
)
{
setPreviewVisible
(
true
)
}
else
if
(
onPress
)
{
onPress
(
e
)
}
}
}
>
<
LazyImage
thumbnailSource=
{
defaultImg
}
fullSource=
{
{
uri
:
source
}
}
style=
{
{
width
,
height
,
borderRadius
,
overflow
:
'hidden'
}
}
resizeMode=
{
resizeMode
}
/>
</
TouchableOpacity
>
)
}
return
(
<
LazyImage
thumbnailSource=
{
defaultImg
}
fullSource=
{
{
uri
:
source
}
}
style=
{
{
width
,
height
,
borderRadius
,
overflow
:
'hidden'
}
}
resizeMode=
{
resizeMode
}
/>
)
}
return
(
<
View
style=
{
[
styles
.
imageBox
,
style
]
}
>
{
source
?
showImgBg
()
:
(
<
LazyImage
thumbnailSource=
{
defaultImg
}
fullSource=
{
{
uri
:
source
}
}
style=
{
{
width
,
height
,
borderRadius
,
overflow
:
'hidden'
}
}
resizeMode=
{
resizeMode
}
/>
)
}
{
canPreview
&&
(
<
Modal
visible=
{
previewVisible
}
onRequestClose=
{
()
=>
setPreviewVisible
(
false
)
}
transparent
>
<
ImageViewer
imageUrls=
{
[{
url
:
source
}]
as
unknown
as
IImageInfo
[]
}
index=
{
0
}
onClick=
{
()
=>
setPreviewVisible
(
false
)
}
/>
</
Modal
>
)
}
</
View
>
)
}
ImageBox
.
defaultProps
=
{
width
:
106
,
height
:
106
,
style
:
{},
resizeMode
:
"cover"
,
borderRadius
:
4
,
canPreview
:
false
,
onPress
:
undefined
,
}
export
default
ImageBox
src/components/ImageBox/styles.ts
0 → 100755
View file @
cce1f4a6
import
{
StyleSheet
}
from
'react-native'
export
default
StyleSheet
.
create
({
imageBox
:
{
overflow
:
'hidden'
,
},
})
src/components/LazyImage/index.tsx
0 → 100644
View file @
cce1f4a6
import
React
,
{
useRef
}
from
'react'
;
import
{
View
,
StyleSheet
,
ViewStyle
,
Animated
,
ImageResizeMode
,
}
from
'react-native'
;
import
defaultImg
from
'../../../assets/images/default_img.png'
interface
LazyImageProps
{
thumbnailSource
:
any
;
fullSource
:
any
;
style
?:
ViewStyle
;
resizeMode
:
ImageResizeMode
;
}
const
styles
=
StyleSheet
.
create
({
image
:
{
position
:
'absolute'
,
top
:
0
,
bottom
:
0
,
left
:
0
,
right
:
0
,
},
});
const
LazyImage
:
React
.
FC
<
LazyImageProps
>
=
(
props
)
=>
{
const
{
thumbnailSource
,
fullSource
,
style
,
resizeMode
}
=
props
;
const
opacity
=
useRef
(
new
Animated
.
Value
(
0
)).
current
;
const
onImageLoad
=
()
=>
{
Animated
.
timing
(
opacity
,
{
toValue
:
1
,
duration
:
300
,
useNativeDriver
:
true
,
}).
start
();
};
return
(
<
View
style=
{
style
}
>
{
fullSource
.
uri
?
(
<
Animated
.
Image
source=
{
fullSource
}
defaultSource=
{
thumbnailSource
}
style=
{
[
styles
.
image
,
{
opacity
,
},
]
}
resizeMode=
{
resizeMode
}
onLoad=
{
onImageLoad
}
/>
)
:
(
<
Animated
.
Image
source=
{
defaultImg
}
style=
{
[
styles
.
image
,
{
opacity
,
},
]
}
resizeMode=
{
resizeMode
}
onLoad=
{
onImageLoad
}
/>
)
}
</
View
>
);
};
export
default
LazyImage
;
src/components/Loading/Spin.tsx
View file @
cce1f4a6
...
...
@@ -7,7 +7,6 @@
*/
import
React
,
{
useEffect
,
useRef
}
from
'react'
;
import
{
Animated
,
Easing
,
ViewStyle
}
from
'react-native'
;
import
{
Icons
}
from
'@linkseeks/god-mobile'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
styles
from
'./styles'
;
...
...
@@ -73,7 +72,7 @@ const Spin: React.FC<IProps> = (props: IProps) => {
},
]
}
>
<
Icons
name=
"loading2"
size=
{
size
}
color=
{
color
}
/>
{
/* <Icons name="loading2" size={size} color={color} /> */
}
</
Animated
.
View
>
);
};
...
...
src/components/Loading/index.tsx
View file @
cce1f4a6
...
...
@@ -9,11 +9,9 @@ import React from 'react';
import
{
StyleSheet
,
ViewStyle
,
}
from
'react-native'
;
import
{
View
,
Text
,
}
from
'
@linkseeks/god-mobil
e'
;
}
from
'
react-nativ
e'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
Spin
from
'./Spin'
;
import
styles
from
'./styles'
;
...
...
src/components/NoticeBar/index.tsx
View file @
cce1f4a6
...
...
@@ -14,7 +14,6 @@ import {
ScrollView
,
LayoutChangeEvent
,
}
from
'react-native'
;
import
{
Icons
}
from
'@linkseeks/god-mobile'
;
import
themeColors
from
'../../constants/theme/colors'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
styles
from
'./styles'
;
...
...
@@ -232,11 +231,11 @@ const NoticeBar: React.FC<NoticeBarProps> = (props: NoticeBarProps) => {
>
{
hasIcon
?
(
<
View
style=
{
myStyle
[
'boticeBar-icon'
]
}
>
<
Icons
{
/*
<Icons
size={16}
name={icon || 'sound'}
color={PRESETS_COLOR_MAP[theme][0]}
/>
/>
*/
}
</
View
>
)
:
null
}
</
View
>
...
...
@@ -253,12 +252,12 @@ const NoticeBar: React.FC<NoticeBarProps> = (props: NoticeBarProps) => {
myStyle
[
'boticeBar-action'
],
]
}
>
<
Icons
{
/*
<Icons
size={16}
// eslint-disable-next-line no-nested-ternary
name="right"
color={PRESETS_COLOR_MAP[theme][0]}
/>
/>
*/
}
</
TouchableOpacity
>
)
:
null
}
{
closable
?
(
...
...
@@ -269,12 +268,12 @@ const NoticeBar: React.FC<NoticeBarProps> = (props: NoticeBarProps) => {
activeOpacity=
{
0.8
}
onPress=
{
handleClose
}
>
<
Icons
{
/*
<Icons
size={16}
// eslint-disable-next-line no-nested-ternary
name="close"
color={PRESETS_COLOR_MAP[theme][0]}
/>
/>
*/
}
</
TouchableOpacity
>
)
:
null
}
</
TouchableOpacity
>
...
...
src/components/Popup/index.tsx
View file @
cce1f4a6
...
...
@@ -16,7 +16,6 @@ import {
StyleSheet
,
TextStyle
,
}
from
'react-native'
;
import
{
Icons
}
from
'@linkseeks/god-mobile'
;
import
Overlay
from
'../Overlay'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
styles
from
'./styles'
;
...
...
@@ -211,13 +210,18 @@ const Popup: React.FC<PopupProps> = (props: PopupProps) => {
activeOpacity=
{
0.8
}
onPress=
{
handleCancel
}
>
{
closeIcon
===
'close'
?
(
{
/* {
closeIcon === 'close' ? (
<View style={myStyle['popup-ship-close-icon']}>
<Icons name={closeIcon} size={14} color="rgb(227, 228, 229)" />
</View>
) : (
<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
>
)
}
{
title
?
(
...
...
src/components/Radio/index.tsx
View file @
cce1f4a6
...
...
@@ -7,7 +7,6 @@
*/
import
React
,
{
useContext
}
from
'react'
;
import
{
View
,
Text
,
StyleSheet
,
TouchableOpacity
}
from
'react-native'
;
import
{
Icons
}
from
'@linkseeks/god-mobile'
;
import
{
useTheme
}
from
'@react-navigation/native'
;
import
{
ThemeStyle
}
from
'../../constants/theme'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
...
...
@@ -102,14 +101,14 @@ const Radio = (props: RadioProps) => {
finalDisabled
?
myStyle
[
'radio-icon__disabled'
]
:
null
,
])
}
>
<
Icons
{
/*
<Icons
name="check"
size={finalSize - 4}
color={!finalDisabled ? '#FFFFFF' : '#c8c9cc'}
style={{
opacity: isCheck ? 1 : 0,
}}
/>
/>
*/
}
</
View
>
{
!!
children
&&
(
contentNode
...
...
src/components/Search/index.tsx
View file @
cce1f4a6
...
...
@@ -11,8 +11,9 @@ import {
StyleSheet
,
TextInput
,
TouchableOpacity
,
View
,
Text
,
}
from
'react-native'
;
import
{
View
,
Text
,
Icons
}
from
'@linkseeks/god-mobile'
;
import
{
useTheme
}
from
'@react-navigation/native'
;
import
{
ThemeStyle
}
from
'../../constants/theme'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
...
...
@@ -210,7 +211,7 @@ const Search: React.FC<SearchProps> = React.forwardRef((props: SearchProps, ref:
<
Text
style=
{
myStyle
[
'search-label'
]
}
>
{
label
}
</
Text
>
)
}
<
View
style=
{
[
myStyle
[
'search-control'
]]
}
>
{
!
customLeftIcon
?
(
{
/* {
!customLeftIcon ? (
<Icons
type="feather"
name={leftIcon}
...
...
@@ -220,6 +221,9 @@ const Search: React.FC<SearchProps> = React.forwardRef((props: SearchProps, ref:
/>
) : (
customLeftIcon
)} */
}
{
!
customLeftIcon
?
null
:
(
customLeftIcon
)
}
<
View
style=
{
myStyle
[
'search-field-wrap'
]
}
...
...
@@ -256,11 +260,11 @@ const Search: React.FC<SearchProps> = React.forwardRef((props: SearchProps, ref:
style=
{
myStyle
[
'search-control-right-icon'
]
}
onPress=
{
handleClear
}
>
<
Icons
{
/*
<Icons
name="closecircle"
size={18}
color="#C0C4CC"
/>
/>
*/
}
</
TouchableOpacity
>
)
}
</
View
>
...
...
src/components/Shuttle/index.tsx
View file @
cce1f4a6
...
...
@@ -6,8 +6,7 @@
* @Description: 穿梭机
*/
import
React
from
'react'
;
import
{
TextStyle
,
TouchableOpacity
}
from
'react-native'
;
import
{
Text
,
Icons
}
from
'@linkseeks/god-mobile'
;
import
{
TextStyle
,
TouchableOpacity
,
Text
}
from
'react-native'
;
import
useAppStyle
from
'../../hooks/useAppStyle'
;
import
styles
from
'./styles'
;
...
...
@@ -46,12 +45,12 @@ const Shuttle: React.FC<ShuttleProps> = (props: ShuttleProps) => {
<
Text
style=
{
[
myStyle
[
'shuttle-describe'
],
customDescribeStyle
]
}
>
{
describe
}
</
Text
>
<
Icons
{
/*
<Icons
name="right"
size={12}
color="#C0C4CC"
style={customDescribeStyle}
/>
/>
*/
}
</
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