TASH: #122795 修改 time 组件的 type 命名

This commit is contained in:
duanzhijiang 2022-11-21 16:57:19 +08:00
parent 406501c7d7
commit 0f5d2de361
3 changed files with 8 additions and 7 deletions

View File

@ -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

View File

@ -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);

View File

@ -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 {
</div>
</div>
<div id="clock-line" type=${this.type}>
${this.type == 4 ? this.line : ''}
${this.type == 'convertional' ? this.line : ''}
</div>
<div id="clock-minute">
<div class="clock-time" id="clock-time-minuteFirst" type=${this.type}>