Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
软件工程实践2022年春W班
穿梭在银河的火箭队
FZUStudyRoom
提交
27489f7d
F
FZUStudyRoom
项目概览
软件工程实践2022年春W班
/
穿梭在银河的火箭队
/
FZUStudyRoom
通知
12
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
FZUStudyRoom
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
27489f7d
编写于
5月 05, 2022
作者:
ItbGcthate
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
304_add2-PlayerPKState
上级
f1a3e1ec
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
494 addition
and
60 deletion
+494
-60
component/OnlineStudy/2-PlayerPKHome/index.js
component/OnlineStudy/2-PlayerPKHome/index.js
+6
-9
component/OnlineStudy/2-PlayerPKState/img/clock1.png
component/OnlineStudy/2-PlayerPKState/img/clock1.png
+0
-0
component/OnlineStudy/2-PlayerPKState/index.js
component/OnlineStudy/2-PlayerPKState/index.js
+107
-0
component/OnlineStudy/2-PlayerPKStudy/index.js
component/OnlineStudy/2-PlayerPKStudy/index.js
+64
-24
component/OnlineStudy/BannerStyle/index.js
component/OnlineStudy/BannerStyle/index.js
+65
-0
component/OnlineStudy/GlobalSetting/index.js
component/OnlineStudy/GlobalSetting/index.js
+1
-1
component/OnlineStudy/MyBanner/index.js
component/OnlineStudy/MyBanner/index.js
+206
-0
component/OnlineStudy/MyButton/index.js
component/OnlineStudy/MyButton/index.js
+42
-21
component/OnlineStudy/MyStatistics/index.js
component/OnlineStudy/MyStatistics/index.js
+1
-0
component/OnlineStudy/SettingButton/index.js
component/OnlineStudy/SettingButton/index.js
+2
-1
component/OnlineStudy/index.js
component/OnlineStudy/index.js
+0
-4
未找到文件。
component/OnlineStudy/2-PlayerPKHome/index.js
浏览文件 @
27489f7d
import
React
,
{
Component
}
from
'
react
'
;
import
{
View
,
Text
,
StyleSheet
,
Dimensions
,
Image
,
}
from
'
react-native
'
;
import
{
View
,
Text
,
StyleSheet
,
Dimensions
,
Image
}
from
'
react-native
'
;
import
Img1
from
'
./img/img1.png
'
;
import
Img2
from
'
./img/img2.png
'
;
import
MyButton
from
'
../MyButton
'
;
...
...
@@ -29,6 +23,7 @@ class TwoPlayerPKHome extends Component {
start
=
()
=>
{
this
.
props
.
navigation
.
navigate
(
'
双人PK中
'
);
//console.log('1');
};
render
()
{
...
...
@@ -37,7 +32,7 @@ class TwoPlayerPKHome extends Component {
<
View
style
=
{
styles
.
container
}
>
<
Image
source
=
{
isChanged
?
Img2
:
Img1
}
style
=
{
styles
.
image
}
/
>
<
MyButton
style
=
{
styles
.
myButton
}
containerStyle
=
{
styles
.
myButton
.
container
}
title
=
"
开始
"
onPressIn
=
{
this
.
in
}
onPressOut
=
{
this
.
out
}
...
...
@@ -60,7 +55,9 @@ const styles = StyleSheet.create({
flex
:
3
,
},
myButton
:
{
flex
:
1
,
container
:
{
flex
:
1
,
},
},
});
...
...
component/OnlineStudy/2-PlayerPKState/img/clock1.png
0 → 100644
浏览文件 @
27489f7d
11.9 KB
component/OnlineStudy/2-PlayerPKState/index.js
0 → 100644
浏览文件 @
27489f7d
import
React
,
{
Component
}
from
'
react
'
;
import
{
View
,
Text
,
StyleSheet
,
Dimensions
,
Pressable
,
Image
,
}
from
'
react-native
'
;
import
PropTypes
from
'
prop-types
'
;
import
Clock
from
'
./img/clock1.png
'
;
const
{
width
,
height
}
=
Dimensions
.
get
(
'
window
'
);
class
TwoPlayerPKState
extends
Component
{
constructor
()
{
super
();
}
static
propTypes
=
{
isStarted
:
PropTypes
.
bool
.
isRequired
,
time
:
PropTypes
.
string
,
containerStyle
:
PropTypes
.
object
,
buttonStyle
:
PropTypes
.
object
,
insideStyle
:
PropTypes
.
object
,
textStyle
:
PropTypes
.
object
,
};
render
()
{
const
{
containerStyle
,
buttonStyle
,
insideStyle
,
textStyle
,
time
,
isStarted
,
}
=
this
.
props
;
return
(
<
View
style
=
{{...
styles
.
container
,
...
containerStyle
}}
>
<
Pressable
style
=
{{...
styles
.
buttonStyle
,
...
buttonStyle
}}
>
<
View
style
=
{{...
styles
.
containerInside
,
...
insideStyle
}}
>
<
Text
style
=
{{...
styles
.
text
,
...
textStyle
}}
>
{
isStarted
?
'
本局时长
'
:
'
寻找对手
'
}
<
/Text
>
<
/View
>
<
View
style
=
{{...
styles
.
containerTime
}}
>
<
Text
style
=
{{...
styles
.
textTime
}}
numberOfLines
=
{
1
}
ellipsizeMode
=
{
'
clip
'
}
>
{
isStarted
?
time
:
'
请稍等
'
}
<
/Text
>
<
/View
>
<
Image
source
=
{
Clock
}
style
=
{
styles
.
image
}
/
>
<
/Pressable
>
<
/View
>
);
}
}
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
margin
:
3
,
},
containerInside
:
{
justifyContent
:
'
center
'
,
borderWidth
:
3
,
borderColor
:
'
#BF7636
'
,
backgroundColor
:
'
#F2E2CE
'
,
//opacity: 0.5,
marginBottom
:
'
20%
'
,
flex
:
1
,
},
containerTime
:
{
justifyContent
:
'
center
'
,
flex
:
1
,
},
text
:
{
fontSize
:
18
,
color
:
'
#BF7636
'
,
fontWeight
:
'
bold
'
,
textAlign
:
'
center
'
,
},
textTime
:
{
fontSize
:
30
,
color
:
'
#BF7636
'
,
fontWeight
:
'
900
'
,
textAlign
:
'
center
'
,
},
image
:
{
marginTop
:
'
20%
'
,
opacity
:
0.5
,
flex
:
2
,
resizeMode
:
'
contain
'
,
width
:
null
,
height
:
null
,
},
buttonStyle
:
{
borderRadius
:
3
,
flex
:
1
,
margin
:
10
,
},
});
export
default
TwoPlayerPKState
;
component/OnlineStudy/2-PlayerPKStudy/index.js
浏览文件 @
27489f7d
import
'
../GlobalSetting
'
;
import
React
,
{
Component
}
from
'
react
'
;
import
{
View
,
Text
,
StyleSheet
,
Dimensions
}
from
'
react-native
'
;
import
MyButton
from
'
../MyButton
'
;
import
{
View
,
Text
,
StyleSheet
,
Dimensions
,
Alert
}
from
'
react-native
'
;
import
MyStatistics
from
'
../MyStatistics
'
;
import
MyTitle
from
'
../MyTitle
'
;
import
SettingButton
from
'
../SettingButton
'
;
import
MyBanner
from
'
../MyBanner
'
;
import
TwoPlayerPKState
from
"
../2-PlayerPKState
"
;
const
{
width
,
height
}
=
Dimensions
.
get
(
'
window
'
);
/**
* 标语风格切换共使用了组件:
* 1. GlobalSetting(引入global变量global.bannerStyle,来控制标语风格)
* 2. SettingButton
* 3. BannerStyle(在你的Navigator中引入)
* 4. MyButton(在BannerStyle组件中引入)
* 5. MyBanner
*
* 此外,还使用了:
* 1. componentDidMount
* 2. componentWillUnmount
*/
class
TwoPlayerPKMode
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
props
.
navigation
.
setOptions
({
constructor
()
{
super
();
}
state
=
{
victories
:
0
,
isStarted
:
false
,
timeInAGame
:
'
95:48
'
,
timeInAMatch
:
'
199:80
'
,
};
componentDidMount
()
{
const
{
navigation
}
=
this
.
props
;
navigation
.
setOptions
({
// 引入SettingButton组件至header的右边
// 并把this.props传给SettingButton组件以实现Navigation的跳转
headerRight
:
()
=>
<
SettingButton
{...
this
.
props
}
/>
,
});
this
.
unsubscribe
=
navigation
.
addListener
(
'
focus
'
,
()
=>
{
// Screen was focused
// Do something
// 强制刷新组件,读取最新的global.bannerStyle
this
.
forceUpdate
();
});
}
componentWillUnmount
()
{
this
.
unsubscribe
();
}
finish
=
()
=>
{
Alert
.
alert
(
'
结算确认
'
,
'
您确定要结束PK并结算成绩吗?
'
,
[
{
text
:
'
取消
'
,
onPress
:
()
=>
console
.
log
(
'
Cancel Pressed
'
),
style
:
'
cancel
'
,
},
{
text
:
'
是的
'
,
onPress
:
()
=>
console
.
log
(
'
OK Pressed
'
)},
]);
};
render
()
{
const
{
victories
,
isStarted
,
timeInAGame
,
timeInAMatch
}
=
this
.
state
;
return
(
<
View
style
=
{
styles
.
container
}
>
<
MyTitle
title
=
{
'
您已战胜
'
+
'
1
'
+
'
人
'
}
title
=
{
'
您已战胜
'
+
victories
.
toString
()
+
'
人
'
}
style
=
{
styles
.
containerTitle
}
/
>
<
View
style
=
{
styles
.
containerMain
}
>
<
MyStatistics
/>
<
View
style
=
{
styles
.
containerInCentre
}
>
<
Text
style
=
{
styles
.
text
}
>
Study自习模块
<
/Text
>
<
/View
>
<
TwoPlayerPKState
isStarted
=
{
isStarted
}
time
=
{
timeInAGame
}
/
>
<
MyStatistics
containerStyle
=
{
styles
.
containerOnRight
}
insideStyle
=
{
styles
.
containerInRightColumn
}
...
...
@@ -35,14 +80,12 @@ class TwoPlayerPKMode extends Component {
/
>
<
/View
>
<
View
style
=
{
styles
.
containerTimer
}
>
<
Text
style
=
{
styles
.
textTimer
}
>
09
:
15
<
/Text
>
<
Text
style
=
{
styles
.
textTimer
}
>
{
timeInAMatch
}
<
/Text
>
<
/View
>
<
MyB
utton
style
=
{
styles
.
myButton
}
<
MyB
anner
containerStyle
=
{
styles
.
myButton
.
container
}
title
=
{
'
结算
'
}
onPress
=
{()
=>
{
return
console
.
log
(
global
.
bannerStyle
);
}}
onPress
=
{
this
.
finish
}
/
>
<
/View
>
);
...
...
@@ -64,6 +107,7 @@ const styles = StyleSheet.create({
flexDirection
:
'
row
'
,
},
containerTimer
:
{
justifyContent
:
'
center
'
,
flex
:
1
,
flexDirection
:
'
row
'
,
},
...
...
@@ -78,12 +122,6 @@ const styles = StyleSheet.create({
textOnRight
:
{
color
:
'
#f4cb8c
'
,
},
containerInCentre
:
{
borderWidth
:
3
,
backgroundColor
:
'
#F2E2CE
'
,
//opacity: 0.5,
flex
:
1
,
},
textTimer
:
{
textAlignVertical
:
'
center
'
,
flex
:
1
,
...
...
@@ -98,7 +136,9 @@ const styles = StyleSheet.create({
textAlign
:
'
center
'
,
},
myButton
:
{
flex
:
2
,
container
:
{
flex
:
2
,
},
},
});
...
...
component/OnlineStudy/BannerStyle/index.js
浏览文件 @
27489f7d
...
...
@@ -10,6 +10,11 @@ class BannerStyle extends Component {
super
();
}
/**
* return a function to change global.bannerStyle
* @param num
* @returns {(function(): void)|*}
*/
changeBannerStyle
=
num
=>
{
return
()
=>
{
global
.
bannerStyle
=
num
;
...
...
@@ -22,21 +27,25 @@ class BannerStyle extends Component {
<
View
style
=
{
styles
.
container
}
>
<
MyButton
title
=
{
'
模式1
'
}
{...
styles
.
myButton1
}
onPress
=
{
this
.
changeBannerStyle
(
1
)}
disabled
=
{
global
.
bannerStyle
===
1
}
/
>
<
MyButton
title
=
{
'
模式2
'
}
{...
styles
.
myButton2
}
onPress
=
{
this
.
changeBannerStyle
(
2
)}
disabled
=
{
global
.
bannerStyle
===
2
}
/
>
<
MyButton
title
=
{
'
模式3
'
}
{...
styles
.
myButton3
}
onPress
=
{
this
.
changeBannerStyle
(
3
)}
disabled
=
{
global
.
bannerStyle
===
3
}
/
>
<
MyButton
title
=
{
'
模式4
'
}
{...
styles
.
myButton4
}
onPress
=
{
this
.
changeBannerStyle
(
4
)}
disabled
=
{
global
.
bannerStyle
===
4
}
/
>
...
...
@@ -51,6 +60,62 @@ const styles = StyleSheet.create({
//opacity: 0.5,
flex
:
1
,
},
myButton1
:
{
textEnabled
:
{
color
:
'
#bf7636
'
,
},
buttonStyle
:
{
width
:
'
75%
'
,
borderRadius
:
15
,
borderWidth
:
2
,
},
buttonEnabled
:
{
backgroundColor
:
'
#f7e2c3
'
,
borderColor
:
'
#c98c55
'
,
},
},
myButton2
:
{
textEnabled
:
{
color
:
'
#60bed9
'
,
},
buttonStyle
:
{
width
:
'
75%
'
,
borderRadius
:
15
,
borderWidth
:
2
,
},
buttonEnabled
:
{
backgroundColor
:
'
#daeae7
'
,
borderColor
:
'
#70d1e7
'
,
},
},
myButton3
:
{
textEnabled
:
{
color
:
'
#ee8bc0
'
,
},
buttonStyle
:
{
width
:
'
75%
'
,
borderRadius
:
15
,
borderWidth
:
2
,
},
buttonEnabled
:
{
backgroundColor
:
'
#f9dbe4
'
,
borderColor
:
'
#fbb9df
'
,
},
},
myButton4
:
{
textEnabled
:
{
color
:
'
#d75c4b
'
,
},
buttonStyle
:
{
width
:
'
75%
'
,
borderRadius
:
15
,
borderWidth
:
2
,
},
buttonEnabled
:
{
backgroundColor
:
'
#f1b2a6
'
,
borderColor
:
'
#e76051
'
,
},
},
});
export
default
BannerStyle
;
component/OnlineStudy/GlobalSetting/index.js
浏览文件 @
27489f7d
global
.
bannerStyle
=
1
;
global
.
bannerStyle
=
1
;
//标语风格的代号
component/OnlineStudy/MyBanner/index.js
0 → 100644
浏览文件 @
27489f7d
import
'
../GlobalSetting
'
;
import
React
,
{
Component
}
from
'
react
'
;
import
{
StyleSheet
,
Dimensions
,
View
}
from
'
react-native
'
;
import
PropTypes
from
'
prop-types
'
;
import
MyButton
from
'
../MyButton
'
;
const
{
width
,
height
}
=
Dimensions
.
get
(
'
window
'
);
class
MyBanner
extends
Component
{
constructor
()
{
super
();
}
componentWillUnmount
()
{
clearInterval
(
this
.
timer
);
}
state
=
{
isButtonVisible
:
false
};
static
propTypes
=
{
containerStyle
:
PropTypes
.
object
,
buttonStyle
:
PropTypes
.
object
,
textStyle
:
PropTypes
.
object
,
buttonEnabled
:
PropTypes
.
object
,
textEnabled
:
PropTypes
.
object
,
buttonDisabled
:
PropTypes
.
object
,
textDisabled
:
PropTypes
.
object
,
title
:
PropTypes
.
string
,
onPressIn
:
PropTypes
.
func
,
onPressOut
:
PropTypes
.
func
,
onPress
:
PropTypes
.
func
,
disabled
:
PropTypes
.
bool
,
};
chooseBannerStyle
=
()
=>
{
switch
(
global
.
bannerStyle
)
{
case
1
:
return
styles
.
bannerStyle1
;
case
2
:
return
styles
.
bannerStyle2
;
case
3
:
return
styles
.
bannerStyle3
;
case
4
:
return
styles
.
bannerStyle4
;
default
:
break
;
}
};
clickOnBanner
=
()
=>
{
this
.
setState
({
isButtonVisible
:
true
});
};
pressOutBanner
=
()
=>
{
this
.
timer
=
setTimeout
(()
=>
{
//执行代码
this
.
setState
({
isButtonVisible
:
false
});
},
5000
);
};
render
()
{
const
{
containerStyle
,
buttonStyle
,
textStyle
,
buttonEnabled
,
textEnabled
,
buttonDisabled
,
textDisabled
,
title
,
onPressIn
,
onPressOut
,
onPress
,
disabled
,
}
=
this
.
props
;
const
myButton
=
{
buttonStyle
,
textStyle
,
buttonEnabled
,
textEnabled
,
buttonDisabled
,
textDisabled
,
title
,
onPressIn
,
onPressOut
,
onPress
,
disabled
,
};
const
container
=
{...
styles
.
container
,
...
containerStyle
};
const
bannerStyle
=
this
.
chooseBannerStyle
();
const
banner
=
{
containerStyle
:
styles
.
containerStyle
,
textEnabled
:
bannerStyle
.
textEnabled
,
textDisabled
:
bannerStyle
.
textDisabled
,
textStyle
:
styles
.
textStyle
,
buttonEnabled
:
bannerStyle
.
buttonEnabled
,
buttonDisabled
:
bannerStyle
.
buttonDisabled
,
buttonStyle
:
styles
.
buttonStyle
,
title
:
'
别盯着手机看了
'
,
};
return
(
<
View
style
=
{
container
}
>
{
this
.
state
.
isButtonVisible
?
(
<
MyButton
{...
myButton
}
/
>
)
:
(
<
MyButton
{...
banner
}
onPress
=
{
this
.
clickOnBanner
}
onPressOut
=
{
this
.
pressOutBanner
}
/
>
)}
<
/View
>
);
}
}
const
styles
=
StyleSheet
.
create
({
container
:
{
justifyContent
:
'
center
'
,
flex
:
1
,
},
//for component
containerStyle
:
{
justifyContent
:
'
center
'
,
flex
:
1
,
},
//for banner
bannerStyle1
:
{
textEnabled
:
{
color
:
'
#bf7636
'
,
},
textDisabled
:
{
color
:
'
#a0a0a0
'
,
},
buttonEnabled
:
{
backgroundColor
:
'
#f7e2c3
'
,
borderColor
:
'
#c98c55
'
,
},
buttonDisabled
:
{
backgroundColor
:
'
#e6e6e6
'
,
borderColor
:
'
#D6D6D6
'
,
},
},
bannerStyle2
:
{
textEnabled
:
{
color
:
'
#60bed9
'
,
},
textDisabled
:
{
color
:
'
#a0a0a0
'
,
},
buttonEnabled
:
{
backgroundColor
:
'
#daeae7
'
,
borderColor
:
'
#70d1e7
'
,
},
buttonDisabled
:
{
backgroundColor
:
'
#e6e6e6
'
,
borderColor
:
'
#D6D6D6
'
,
},
},
bannerStyle3
:
{
textEnabled
:
{
color
:
'
#ee8bc0
'
,
},
textDisabled
:
{
color
:
'
#a0a0a0
'
,
},
buttonEnabled
:
{
backgroundColor
:
'
#f9dbe4
'
,
borderColor
:
'
#fbb9df
'
,
},
buttonDisabled
:
{
backgroundColor
:
'
#e6e6e6
'
,
borderColor
:
'
#D6D6D6
'
,
},
},
bannerStyle4
:
{
textEnabled
:
{
color
:
'
#d75c4b
'
,
},
textDisabled
:
{
color
:
'
#a0a0a0
'
,
},
buttonEnabled
:
{
backgroundColor
:
'
#f1b2a6
'
,
borderColor
:
'
#e76051
'
,
},
buttonDisabled
:
{
backgroundColor
:
'
#e6e6e6
'
,
borderColor
:
'
#D6D6D6
'
,
},
},
textStyle
:
{
flex
:
1
,
fontSize
:
parseInt
(
height
)
/
23
,
fontWeight
:
'
bold
'
,
textAlign
:
'
center
'
,
textAlignVertical
:
'
center
'
,
},
buttonStyle
:
{
alignSelf
:
'
center
'
,
height
:
parseInt
(
height
)
/
8
,
width
:
'
80%
'
,
borderRadius
:
10
,
borderWidth
:
4
,
},
});
export
default
MyBanner
;
component/OnlineStudy/MyButton/index.js
浏览文件 @
27489f7d
...
...
@@ -16,7 +16,13 @@ class MyButton extends Component {
}
static
propTypes
=
{
style
:
PropTypes
.
object
,
containerStyle
:
PropTypes
.
object
,
buttonStyle
:
PropTypes
.
object
,
textStyle
:
PropTypes
.
object
,
buttonEnabled
:
PropTypes
.
object
,
textEnabled
:
PropTypes
.
object
,
buttonDisabled
:
PropTypes
.
object
,
textDisabled
:
PropTypes
.
object
,
title
:
PropTypes
.
string
,
onPressIn
:
PropTypes
.
func
,
onPressOut
:
PropTypes
.
func
,
...
...
@@ -25,18 +31,39 @@ class MyButton extends Component {
};
render
()
{
const
{
style
,
title
,
onPressIn
,
onPressOut
,
onPress
,
disabled
}
=
this
.
props
;
const
{
containerStyle
,
buttonStyle
,
textStyle
,
buttonEnabled
,
textEnabled
,
buttonDisabled
,
textDisabled
,
title
,
onPressIn
,
onPressOut
,
onPress
,
disabled
,
}
=
this
.
props
;
const
container
=
{...
styles
.
container
,
...
containerStyle
};
const
buttonDefault
=
{...
styles
.
buttonStyle
,
...
buttonStyle
};
const
textDefault
=
{...
styles
.
textStyle
,
...
textStyle
};
const
button
=
disabled
?
{...
buttonDefault
,
...
styles
.
buttonDisabled
,
...
buttonDisabled
}
:
{...
buttonDefault
,
...
styles
.
buttonEnabled
,
...
buttonEnabled
};
const
text
=
disabled
?
{...
textDefault
,
...
styles
.
textDisabled
,
...
textDisabled
}
:
{...
textDefault
,
...
styles
.
textEnabled
,
...
textEnabled
};
return
(
<
View
style
=
{
{...
styles
.
container
,
...
style
}
}
>
<
View
style
=
{
container
}
>
<
TouchableOpacity
disabled
=
{
disabled
}
style
=
{
disabled
?
styles
.
buttonDisabled
:
styles
.
buttonStyle
}
style
=
{
button
}
onPressIn
=
{
onPressIn
}
onPressOut
=
{
onPressOut
}
onPress
=
{
onPress
}
>
<
Text
style
=
{
disabled
?
styles
.
textDisabled
:
styles
.
textInButton
}
>
{
title
}
<
/Text
>
<
Text
style
=
{
text
}
>
{
title
}
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
);
...
...
@@ -48,39 +75,33 @@ const styles = StyleSheet.create({
justifyContent
:
'
center
'
,
flex
:
1
,
},
textEnabled
:
{
color
:
'
#592202
'
,
},
textDisabled
:
{
flex
:
1
,
fontSize
:
parseInt
(
height
)
/
23
,
color
:
'
#a0a0a0
'
,
fontWeight
:
'
bold
'
,
textAlign
:
'
center
'
,
textAlignVertical
:
'
center
'
,
},
text
InButton
:
{
text
Style
:
{
flex
:
1
,
fontSize
:
parseInt
(
height
)
/
23
,
color
:
'
#592202
'
,
fontWeight
:
'
bold
'
,
textAlign
:
'
center
'
,
textAlignVertical
:
'
center
'
,
},
buttonEnabled
:
{
backgroundColor
:
'
#e1c3a1
'
,
borderColor
:
'
#BF7636
'
,
},
buttonDisabled
:
{
alignSelf
:
'
center
'
,
backgroundColor
:
'
#e6e6e6
'
,
height
:
parseInt
(
height
)
/
8
,
width
:
'
50%
'
,
borderRadius
:
40
,
borderWidth
:
4
,
borderColor
:
'
#D6D6D6
'
,
},
buttonStyle
:
{
alignSelf
:
'
center
'
,
backgroundColor
:
'
#e1c3a1
'
,
height
:
parseInt
(
height
)
/
8
,
width
:
'
50%
'
,
borderRadius
:
40
,
borderWidth
:
4
,
borderColor
:
'
#BF7636
'
,
},
});
...
...
component/OnlineStudy/MyStatistics/index.js
浏览文件 @
27489f7d
...
...
@@ -54,6 +54,7 @@ const styles = StyleSheet.create({
margin
:
3
,
},
containerInside
:
{
justifyContent
:
'
center
'
,
borderWidth
:
3
,
borderColor
:
'
#BF7636
'
,
backgroundColor
:
'
#F2E2CE
'
,
...
...
component/OnlineStudy/SettingButton/index.js
浏览文件 @
27489f7d
...
...
@@ -3,13 +3,14 @@ import {Image, StyleSheet, Text, TouchableOpacity} from 'react-native';
import
Setting
from
'
./img/setting.png
'
;
class
SettingButton
extends
Component
{
//SettingButton组件需要props(如navigation,router等)以实现Navigation的跳转(必要)
constructor
()
{
super
();
}
openSetting
=
()
=>
{
//console.log(this);
this
.
props
.
navigation
.
navigate
(
'
标语风格切换
'
);
this
.
props
.
navigation
.
navigate
(
'
标语风格切换
'
);
//指向BannerStyle组件
};
render
()
{
...
...
component/OnlineStudy/index.js
浏览文件 @
27489f7d
...
...
@@ -14,10 +14,6 @@ class OnlineStudy extends Component {
super
();
}
// componentDidMount() {
// console.log(this);
// }
render
()
{
const
Stack
=
createNativeStackNavigator
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录