Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
软件工程实践2022年春W班
穿梭在银河的火箭队
FZUStudyRoom
提交
f1a3e1ec
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,发现更多精彩内容 >>
提交
f1a3e1ec
编写于
5月 04, 2022
作者:
ItbGcthate
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
304_upadte标语风格切换
上级
62ce44ac
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
46 addition
and
52 deletion
+46
-52
component/OnlineStudy/BannerStyle/index.js
component/OnlineStudy/BannerStyle/index.js
+20
-47
component/OnlineStudy/MyButton/index.js
component/OnlineStudy/MyButton/index.js
+24
-3
component/OnlineStudy/OnlineStudyHome/index.js
component/OnlineStudy/OnlineStudyHome/index.js
+2
-2
未找到文件。
component/OnlineStudy/BannerStyle/index.js
浏览文件 @
f1a3e1ec
import
'
../GlobalSetting
'
;
import
React
,
{
Component
}
from
'
react
'
;
import
{
View
,
Text
,
StyleSheet
,
Dimensions
}
from
'
react-native
'
;
import
{
Button
}
from
'
react-native-elements
'
;
import
MyButton
from
'
../MyButton
'
;
const
{
width
,
height
}
=
Dimensions
.
get
(
'
window
'
);
...
...
@@ -10,48 +10,34 @@ class BannerStyle extends Component {
super
();
}
changeBannerStyle
=
num
=>
{
return
()
=>
{
global
.
bannerStyle
=
num
;
this
.
forceUpdate
();
};
};
render
()
{
return
(
<
View
style
=
{
styles
.
container
}
>
<
Text
style
=
{
styles
.
text
}
>
Study自习模块
<
/Text
>
<
Button
buttonStyle
=
{
styles
.
buttonStyle
}
containerStyle
=
{
styles
.
button_containerStyle
}
title
=
"
button
"
onPress
=
{()
=>
{
global
.
bannerStyle
=
1
;
this
.
forceUpdate
();
}}
<
MyButton
title
=
{
'
模式1
'
}
onPress
=
{
this
.
changeBannerStyle
(
1
)}
disabled
=
{
global
.
bannerStyle
===
1
}
/
>
<
Button
buttonStyle
=
{
styles
.
buttonStyle
}
containerStyle
=
{
styles
.
button_containerStyle
}
title
=
"
button
"
onPress
=
{()
=>
{
global
.
bannerStyle
=
2
;
this
.
forceUpdate
();
}}
<
MyButton
title
=
{
'
模式2
'
}
onPress
=
{
this
.
changeBannerStyle
(
2
)}
disabled
=
{
global
.
bannerStyle
===
2
}
/
>
<
Button
buttonStyle
=
{
styles
.
buttonStyle
}
containerStyle
=
{
styles
.
button_containerStyle
}
title
=
"
button
"
onPress
=
{()
=>
{
global
.
bannerStyle
=
3
;
this
.
forceUpdate
();
}}
<
MyButton
title
=
{
'
模式3
'
}
onPress
=
{
this
.
changeBannerStyle
(
3
)}
disabled
=
{
global
.
bannerStyle
===
3
}
/
>
<
Button
buttonStyle
=
{
styles
.
buttonStyle
}
containerStyle
=
{
styles
.
button_containerStyle
}
title
=
"
button
"
onPress
=
{()
=>
{
global
.
bannerStyle
=
4
;
this
.
forceUpdate
();
}}
<
MyButton
title
=
{
'
模式4
'
}
onPress
=
{
this
.
changeBannerStyle
(
4
)}
disabled
=
{
global
.
bannerStyle
===
4
}
/
>
<
/View
>
...
...
@@ -65,19 +51,6 @@ const styles = StyleSheet.create({
//opacity: 0.5,
flex
:
1
,
},
text
:
{
fontSize
:
50
,
fontWeight
:
'
bold
'
,
textAlign
:
'
center
'
,
},
buttonStyle
:
{
backgroundColor
:
'
#BF7636
'
,
borderRadius
:
3
,
},
button_containerStyle
:
{
width
:
parseInt
(
width
)
/
2
,
marginHorizontal
:
parseInt
(
width
)
/
4
,
},
});
export
default
BannerStyle
;
component/OnlineStudy/MyButton/index.js
浏览文件 @
f1a3e1ec
...
...
@@ -21,18 +21,22 @@ class MyButton extends Component {
onPressIn
:
PropTypes
.
func
,
onPressOut
:
PropTypes
.
func
,
onPress
:
PropTypes
.
func
,
disabled
:
PropTypes
.
bool
,
};
render
()
{
const
{
style
,
title
,
onPressIn
,
onPressOut
,
onPress
}
=
this
.
props
;
const
{
style
,
title
,
onPressIn
,
onPressOut
,
onPress
,
disabled
}
=
this
.
props
;
return
(
<
View
style
=
{{...
styles
.
container
,
...
style
}}
>
<
TouchableOpacity
style
=
{
styles
.
buttonStyle
}
disabled
=
{
disabled
}
style
=
{
disabled
?
styles
.
buttonDisabled
:
styles
.
buttonStyle
}
onPressIn
=
{
onPressIn
}
onPressOut
=
{
onPressOut
}
onPress
=
{
onPress
}
>
<
Text
style
=
{
styles
.
textInButton
}
>
{
title
}
<
/Text
>
<
Text
style
=
{
disabled
?
styles
.
textDisabled
:
styles
.
textInButton
}
>
{
title
}
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
);
...
...
@@ -44,6 +48,14 @@ const styles = StyleSheet.create({
justifyContent
:
'
center
'
,
flex
:
1
,
},
textDisabled
:
{
flex
:
1
,
fontSize
:
parseInt
(
height
)
/
23
,
color
:
'
#a0a0a0
'
,
fontWeight
:
'
bold
'
,
textAlign
:
'
center
'
,
textAlignVertical
:
'
center
'
,
},
textInButton
:
{
flex
:
1
,
fontSize
:
parseInt
(
height
)
/
23
,
...
...
@@ -52,6 +64,15 @@ const styles = StyleSheet.create({
textAlign
:
'
center
'
,
textAlignVertical
:
'
center
'
,
},
buttonDisabled
:
{
alignSelf
:
'
center
'
,
backgroundColor
:
'
#e6e6e6
'
,
height
:
parseInt
(
height
)
/
8
,
width
:
'
50%
'
,
borderRadius
:
40
,
borderWidth
:
4
,
borderColor
:
'
#D6D6D6
'
,
},
buttonStyle
:
{
alignSelf
:
'
center
'
,
backgroundColor
:
'
#e1c3a1
'
,
...
...
component/OnlineStudy/OnlineStudyHome/index.js
浏览文件 @
f1a3e1ec
...
...
@@ -25,7 +25,7 @@ class OnlineStudyHome extends Component {
<
View
style
=
{
styles
.
container
}
>
<
Pressable
android_ripple
=
{{
color
:
'
#
BF7636
'
,
color
:
'
#
FFFFFF
'
,
foreground
:
true
,
}}
onPress
=
{
this
.
twoPlayerPK
}
...
...
@@ -34,7 +34,7 @@ class OnlineStudyHome extends Component {
<
/Pressable
>
<
Pressable
android_ripple
=
{{
color
:
'
#
BF7636
'
,
color
:
'
#
FFFFFF
'
,
foreground
:
true
,
}}
onPress
=
{
this
.
twoPlayerPK
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录