From 0f5d2de361c9eb1a7812c0e60e8aaf7ab1f37348 Mon Sep 17 00:00:00 2001 From: duanzhijiang Date: Mon, 21 Nov 2022 16:57:19 +0800 Subject: [PATCH] =?UTF-8?q?TASH:=20#122795=20=E4=BF=AE=E6=94=B9=20time=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=9A=84=20type=20=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/clock-widget/clock-widget.ts | 2 +- src/components/clock-widget/time/time-style.ts | 9 +++++---- src/components/clock-widget/time/time.ts | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/clock-widget/clock-widget.ts b/src/components/clock-widget/clock-widget.ts index bd558ca..4d801e0 100644 --- a/src/components/clock-widget/clock-widget.ts +++ b/src/components/clock-widget/clock-widget.ts @@ -6,7 +6,7 @@ import './time/time.js' @customElement('clock-widget') class ClockContainer extends LitElement { @property({type: String}) name = 'clock-widget' - @property({type: String}) type = 3 + @property({type: String}) type = 'platinic' @property({type: String}) hourFirst = 0 @property({type: String}) hourSecond = 0 @property({type: String}) minuteFirst = 0 diff --git a/src/components/clock-widget/time/time-style.ts b/src/components/clock-widget/time/time-style.ts index bb222f2..b62c322 100644 --- a/src/components/clock-widget/time/time-style.ts +++ b/src/components/clock-widget/time/time-style.ts @@ -8,7 +8,7 @@ export default css` font-family: 'OPPOSans'; font-style: normal; } - .clock-time[type='3'] { + .clock-time[type='platinic'] { font-weight: 600; font-size: var(--auto-128px); line-height: var(--auto-128px); @@ -17,12 +17,12 @@ export default css` #clock-hour { display: flex; } - #clock-hour div[type='3'] { + #clock-hour div[type='platinic'] { opacity: 0.67; padding-inline-end: var(--auto-10px); } - #clock-minute div[type='3'] { + #clock-minute div[type='platinic'] { padding-inline-start: var(--auto-10px); /* 主题色/黄金渐变 */ background: linear-gradient(180deg, #ebc965 0%, #d9aa38 100%); @@ -31,7 +31,8 @@ export default css` } /* 默认 */ - #clock-line .clock-time[type='4'] { + #clock-line, + .clock-time[type='convertional'] { font-weight: 400; font-size: var(--auto-116px); line-height: var(--auto-116px); diff --git a/src/components/clock-widget/time/time.ts b/src/components/clock-widget/time/time.ts index d99ef75..898e78b 100644 --- a/src/components/clock-widget/time/time.ts +++ b/src/components/clock-widget/time/time.ts @@ -4,7 +4,7 @@ import timeStyles from './time-style.js' @customElement('clock-time') class LockScreenClockTimeContainer extends LitElement { - @property({type: String}) type = 3 + @property({type: String}) type = 'platinic' @property({type: String}) name = 'clock-time' @property({type: String}) hourFirst = 0 @property({type: String}) hourSecond = 0 @@ -25,7 +25,7 @@ class LockScreenClockTimeContainer extends LitElement {
- ${this.type == 4 ? this.line : ''} + ${this.type == 'convertional' ? this.line : ''}