From 4a2e1b0ae2b583830f1fd2d041ef467089288937 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 29 Nov 2021 14:35:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=9A=E4=B8=AA=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E7=9B=B8=E4=BA=92=E5=BD=B1=E5=93=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/widget/DeWidget/TimeSimple.vue | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/frontend/src/components/widget/DeWidget/TimeSimple.vue b/frontend/src/components/widget/DeWidget/TimeSimple.vue index 260d6a25bc..badb0ecd83 100644 --- a/frontend/src/components/widget/DeWidget/TimeSimple.vue +++ b/frontend/src/components/widget/DeWidget/TimeSimple.vue @@ -7,10 +7,9 @@ :width="canvas_width" :height="canvas_height" /> -
-

+

@@ -119,7 +118,7 @@ export default { } const nowWeek = this.week[time.getDay()] var fullTime = showWeek ? (nowDate + ' ' + nowWeek) : nowDate - var fullDoc = document.getElementById('fulltime') + var fullDoc = document.getElementById(this.element.id + '_fulltime') fullDoc.innerHTML = fullTime const draw = draws @@ -140,8 +139,6 @@ export default { draw.beginPath() draw.moveTo(0, side_length / 2 - 0) - /* draw.moveTo(0, side_length / 2 - 70) - draw.lineTo(0, side_length / 2 - 50) */ draw.lineTo(0, side_length / 2 - 20) draw.closePath() draw.stroke() @@ -157,8 +154,6 @@ export default { draw.beginPath() draw.moveTo(0, side_length / 2 - 0) - // draw.lineTo(0, side_length / 2 - 50) - // draw.lineTo(0, side_length / 2 - 60) draw.lineTo(0, side_length / 2 - 10) draw.closePath() draw.stroke() @@ -169,21 +164,18 @@ export default { // 画时阵 draw.save() draw.strokeStyle = this.element.style.color - // draw.translate(250, 250) draw.translate(canvas_w / 2, canvas_h / 2) const hourzs = h + min / 60// 获取浮点类型的小时 draw.rotate(hourzs * 30 * Math.PI / 180) draw.lineWidth = 6 draw.beginPath() draw.moveTo(0, 0) - /* draw.lineTo(0, -(side_length / 2 - 60) / 3) */ draw.lineTo(0, -(side_length / 2) * 0.5) draw.closePath() draw.stroke() draw.restore() // 画分针 draw.save() - // draw.translate(250, 250) draw.translate(canvas_w / 2, canvas_h / 2) draw.rotate(min * 6 * Math.PI / 180) @@ -192,13 +184,11 @@ export default { draw.beginPath() draw.moveTo(0, 0) draw.lineTo(0, -(side_length / 2) * 0.7) - /* draw.lineTo(0, -(side_length / 2 - 60) * 3 / 5) */ draw.closePath() draw.stroke() draw.restore() // 画秒针 draw.save() - // draw.translate(250, 250) draw.translate(canvas_w / 2, canvas_h / 2) draw.rotate(s * 6 * Math.PI / 180) draw.strokeStyle = this.element.style.color @@ -206,16 +196,13 @@ export default { draw.beginPath() draw.moveTo(0, 15) draw.lineTo(0, -(side_length / 2) * 0.9) - /* draw.lineTo(0, -(side_length / 2 - 60)) */ draw.closePath() draw.stroke() draw.restore() // 画中心原点 - // draw.fillStyle = 'rgba(255,255,255,1)' draw.lineWidth = 2 draw.beginPath() - // draw.arc(250, 250, 4, 0, 360, false) draw.arc(canvas_w / 2, canvas_h / 2, 4, 0, 360, false) draw.closePath() draw.fill()