提交 157aefad 编写于 作者: hhh江月's avatar hhh江月 🌈

styles...

上级 d5e99249
......@@ -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;
}
......@@ -16,3 +16,5 @@
<input class="btn1" type="button" value="Back" onclick="onclick1"></input>
</div>
</div>
......@@ -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 {
// }
// },
......@@ -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%;
}
......@@ -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;
}
......@@ -24,3 +24,5 @@
<input class="btn4" type="button" value="Back" onclick="onclick4"></input>
</div>
</div>
......@@ -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.
先完成此消息的编辑!
想要评论请 注册