Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
hhh江月
MyOpenHarmonyProjects
提交
157aefad
MyOpenHarmonyProjects
项目概览
hhh江月
/
MyOpenHarmonyProjects
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MyOpenHarmonyProjects
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
157aefad
编写于
2月 17, 2022
作者:
hhh江月
🌈
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
styles...
上级
d5e99249
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
61 addition
and
3 deletion
+61
-3
MyApplication/entry/src/main/js/MainAbility/pages/clock/clock.css
...ation/entry/src/main/js/MainAbility/pages/clock/clock.css
+12
-0
MyApplication/entry/src/main/js/MainAbility/pages/clock/clock.hml
...ation/entry/src/main/js/MainAbility/pages/clock/clock.hml
+2
-0
MyApplication/entry/src/main/js/MainAbility/pages/clock/clock.js
...cation/entry/src/main/js/MainAbility/pages/clock/clock.js
+14
-2
MyApplication/entry/src/main/js/MainAbility/pages/index/index.css
...ation/entry/src/main/js/MainAbility/pages/index/index.css
+11
-0
MyApplication/entry/src/main/js/MainAbility/pages/index/index.hml
...ation/entry/src/main/js/MainAbility/pages/index/index.hml
+2
-0
MyApplication/entry/src/main/js/MainAbility/pages/second/second.css
...ion/entry/src/main/js/MainAbility/pages/second/second.css
+17
-0
MyApplication/entry/src/main/js/MainAbility/pages/second/second.hml
...ion/entry/src/main/js/MainAbility/pages/second/second.hml
+2
-0
MyApplication/entry/src/main/js/MainAbility/pages/second/second.js
...tion/entry/src/main/js/MainAbility/pages/second/second.js
+1
-1
未找到文件。
MyApplication/entry/src/main/js/MainAbility/pages/clock/clock.css
浏览文件 @
157aefad
...
...
@@ -38,6 +38,10 @@
.contain_btn1
{
justify-content
:
center
;
align-items
:
center
;
margin-top
:
0%
;
margin-bottom
:
0%
;
margin-right
:
0%
;
margin-left
:
0%
;
}
.btn1
{
...
...
@@ -48,6 +52,8 @@
font-family
:
HYQiHei-65S
;
margin-bottom
:
10%
;
margin-top
:
0%
;
margin-right
:
0%
;
margin-left
:
0%
;
text-align
:
center
;
}
...
...
@@ -58,13 +64,19 @@
width
:
1000px
;
justify-content
:
center
;
align-items
:
center
;
margin-left
:
0%
;
margin-right
:
0%
;
margin-bottom
:
0%
;
margin-top
:
0%
;
}
.canvas1
{
text-align
:
center
;
margin-top
:
10%
;
margin-left
:
0%
;
margin-right
:
0%
;
margin-bottom
:
15%
;
background-color
:
white
;
}
MyApplication/entry/src/main/js/MainAbility/pages/clock/clock.hml
浏览文件 @
157aefad
...
...
@@ -16,3 +16,5 @@
<input class="btn1" type="button" value="Back" onclick="onclick1"></input>
</div>
</div>
MyApplication/entry/src/main/js/MainAbility/pages/clock/clock.js
浏览文件 @
157aefad
...
...
@@ -9,11 +9,12 @@ systemTime.setTimezone('Asia/Shanghai', (error, data) => {
console
.
info
(
'
SystemTimePlugin setTimezone success data :
'
+
JSON
.
stringify
(
data
));
});
export
default
{
timer
:
undefined
,
data
:
{
title
:
'
World
'
,
title
:
'
World
.
'
,
hour
:
0
,
minute
:
0
,
...
...
@@ -24,7 +25,7 @@ export default {
setInterval
(
this
.
draw_the_canvas
,
1000
)
},
onInit
()
{
this
.
updateTime
()
;
this
.
updateTime
()
this
.
timer
=
setInterval
(
this
.
updateTime
,
1000
)
},
...
...
@@ -69,11 +70,14 @@ export default {
const
ctx
=
canvas
.
getContext
(
'
2d
'
,
{
draw_the_canvas
:
true
})
ctx
.
fillStyle
=
'
#ffffff
'
ctx
.
fillRect
(
0
,
0
,
640
,
640
)
// refresh
// data s...
let
clockRadius
=
270
var
date
=
new
Date
()
var
hours
=
date
.
getHours
()
var
minutes
=
date
.
getMinutes
()
...
...
@@ -117,6 +121,7 @@ export default {
ctx
.
closePath
()
// hour pin.
ctx
.
save
()
let
theta1
=
(
hours
-
3
)
*
2
*
Math
.
PI
/
12
...
...
@@ -132,6 +137,7 @@ export default {
ctx
.
fill
()
ctx
.
restore
()
// second pin.
ctx
.
save
()
let
theta2
=
(
seconds
-
15
)
*
2
*
Math
.
PI
/
60
...
...
@@ -147,6 +153,7 @@ export default {
ctx
.
fill
()
ctx
.
restore
()
// minute pin.
ctx
.
save
()
let
theta3
=
(
minutes
-
15
)
*
2
*
Math
.
PI
/
60
...
...
@@ -168,9 +175,13 @@ export default {
}
// onInit () {
// this.updateTime();
// this.timer = setInterval(this.updateTime, 1000)//设置1s的定时器
...
...
@@ -191,3 +202,4 @@ export default {
// }
// },
MyApplication/entry/src/main/js/MainAbility/pages/index/index.css
浏览文件 @
157aefad
...
...
@@ -20,6 +20,8 @@
font-family
:
HYQiHei-65S
;
margin-top
:
10%
;
margin-bottom
:
0%
;
margin-right
:
0%
;
margin-left
:
0%
;
}
.btn1
{
...
...
@@ -29,6 +31,9 @@
font-weight
:
bold
;
font-family
:
HYQiHei-65S
;
margin-bottom
:
12%
;
margin-left
:
0%
;
margin-right
:
0%
;
margin-top
:
0%
;
/* type: ButtonType.Capsule;*/
border-radius
:
60px
;
}
...
...
@@ -40,6 +45,9 @@
font-weight
:
bold
;
font-family
:
HYQiHei-65S
;
margin-bottom
:
25%
;
margin-top
:
0%
;
margin-right
:
0%
;
margin-left
:
0%
;
border-radius
:
60px
;
}
...
...
@@ -47,5 +55,8 @@
font-family
:
HYQiHei-65S
;
margin-top
:
1
;
margin-bottom
:
3%
;
margin-left
:
0%
;
margin-right
:
0%
;
}
MyApplication/entry/src/main/js/MainAbility/pages/index/index.hml
浏览文件 @
157aefad
...
...
@@ -18,3 +18,5 @@
</text>
</div>
</div>
MyApplication/entry/src/main/js/MainAbility/pages/second/second.css
浏览文件 @
157aefad
...
...
@@ -26,6 +26,9 @@
font-weight
:
bold
;
font-family
:
HYQiHei-65S
;
margin-bottom
:
5%
;
margin-left
:
0%
;
margin-right
:
0%
;
margin-top
:
0%
;
}
.btn2
{
...
...
@@ -35,6 +38,9 @@
font-weight
:
bold
;
font-family
:
HYQiHei-65S
;
margin-bottom
:
5%
;
margin-top
:
0%
;
margin-right
:
0%
;
margin-left
:
0%
;
}
.btn3
{
...
...
@@ -44,6 +50,9 @@
font-weight
:
bold
;
font-family
:
HYQiHei-65S
;
margin-bottom
:
5%
;
margin-left
:
0%
;
margin-right
:
0%
;
margin-top
:
0%
;
}
.btn4
{
...
...
@@ -53,6 +62,9 @@
font-weight
:
bold
;
font-family
:
HYQiHei-65S
;
margin-bottom
:
12%
;
margin-top
:
0%
;
margin-right
:
0%
;
margin-left
:
0%
;
}
.dialogClass1
{
...
...
@@ -61,6 +73,11 @@
font-weight
:
bold
;
font-family
:
HYQiHei-65S
;
margin-bottom
:
50%
;
margin-left
:
0%
;
margin-right
:
0%
;
margin-top
:
0%
;
text-color
:
mediumslateblue
;
color
:
mediumslateblue
;
}
MyApplication/entry/src/main/js/MainAbility/pages/second/second.hml
浏览文件 @
157aefad
...
...
@@ -24,3 +24,5 @@
<input class="btn4" type="button" value="Back" onclick="onclick4"></input>
</div>
</div>
MyApplication/entry/src/main/js/MainAbility/pages/second/second.js
浏览文件 @
157aefad
...
...
@@ -36,7 +36,7 @@ export default {
onShow
(){
// (e)=>{
this
.
$element
(
"
dialogId1
"
).
show
()
this
.
$element
(
"
dialogId1
"
).
show
()
// }
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录