-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: remove lite size style. close #6
- Loading branch information
Showing
7 changed files
with
70 additions
and
76 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
import { Component, ViewEncapsulation } from '@angular/core'; | ||
import { Config } from "ngx-countdown"; | ||
|
||
@Component({ | ||
selector: 'demo-tpl-flip', | ||
templateUrl: './flip.component.html', | ||
styleUrls: [ './flip.component.scss' ], | ||
encapsulation: ViewEncapsulation.None | ||
}) | ||
export class TplFlipComponent { | ||
config: Config = { | ||
leftTime: 60 * 60 * 24 * 7, | ||
className: 'flip-cd', | ||
repaint: function() { // 这里不可以使用箭头函数,因为对于箭头函数this是强制性的,为了让重绘有更大的权限,必须是function | ||
let me:any = this, | ||
content: string; | ||
me.hands.forEach((hand: any) => { | ||
if (hand.lastValue !== hand.value) { | ||
content = ''; | ||
let cur = me.toDigitals(hand.value + 1, hand.bits).join(''), | ||
next = me.toDigitals(hand.value, hand.bits).join(''); | ||
|
||
hand.node.innerHTML = ` | ||
<span class="count curr top">${cur}</span> | ||
<span class="count next top">${next}</span> | ||
<span class="count next bottom">${next}</span> | ||
<span class="count curr bottom">${cur}</span> | ||
`; | ||
hand.node.parentElement.className = 'time'; | ||
setTimeout(() => { | ||
hand.node.parentElement.className = 'time flip'; | ||
}); | ||
} | ||
}); | ||
}, | ||
} | ||
|
||
} | ||
import { Component, ViewEncapsulation } from '@angular/core'; | ||
import { Config } from '../../../../../src/index'; | ||
|
||
@Component({ | ||
selector: 'demo-tpl-flip', | ||
templateUrl: './flip.component.html', | ||
styleUrls: [ './flip.component.scss' ], | ||
encapsulation: ViewEncapsulation.None | ||
}) | ||
export class TplFlipComponent { | ||
|
||
config: Config = { | ||
leftTime: 60 * 60 * 24 * 7, | ||
className: 'flip-cd', | ||
repaint: function() { // 这里不可以使用箭头函数,因为对于箭头函数this是强制性的,为了让重绘有更大的权限,必须是function | ||
const me: any = this; | ||
let content: string; | ||
|
||
me.hands.forEach((hand: any) => { | ||
if (hand.lastValue !== hand.value) { | ||
content = ''; | ||
let cur = me.toDigitals(hand.value + 1, hand.bits).join(''), | ||
next = me.toDigitals(hand.value, hand.bits).join(''); | ||
|
||
hand.node.innerHTML = ` | ||
<span class="count curr top">${cur}</span> | ||
<span class="count next top">${next}</span> | ||
<span class="count next bottom">${next}</span> | ||
<span class="count curr bottom">${cur}</span> | ||
`; | ||
hand.node.parentElement.className = 'time'; | ||
setTimeout(() => { | ||
hand.node.parentElement.className = 'time flip'; | ||
}); | ||
} | ||
}); | ||
}, | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters