feat(CountDown): support SS and S format (#5154)

This commit is contained in:
neverland
2019-11-30 08:58:36 +08:00
committed by GitHub
parent d1a8adab20
commit 7f2e9b21c3
6 changed files with 70 additions and 6 deletions
+14 -2
View File
@@ -42,7 +42,7 @@ export default {
<van-count-down
millisecond
:time="time"
format="HH:mm:ss:SSS"
format="HH:mm:ss:SS"
/>
```
@@ -114,10 +114,22 @@ export default {
| Attribute | Description | Type | Default | Version |
|------|------|------|------|------|
| time | Total time | *number* | - | - |
| format | Time formatDD-dayHH-hourmm-minutess-secondSSS-millisecond | *string* | `HH:mm:ss` | - |
| format | Time format | *string* | `HH:mm:ss` | - |
| auto-start | Whether to auto start count down | *boolean* | `true` | - |
| millisecond | Whether to enable millisecond render | *boolean* | `false` | - |
### Available formats
| Format | Description |
|------|------|
| DD | Day |
| HH | Hour |
| mm | Minute |
| ss | Second |
| S | Millisecond, 1-digit |
| SS | Millisecond, 2-digits |
| SSS | Millisecond, 3-digits |
### Events
| Event | Description | Arguments |