File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { View } from '@tarojs/components'
10
10
import { ComponentDefaults } from '@/utils/typings'
11
11
import { padZero } from '@/utils/pad-zero'
12
12
import { web } from '@/utils/platform-taro'
13
+ import { CountDownProps } from './types'
13
14
14
15
interface CountDownTimeProps {
15
16
d : number
@@ -289,7 +290,7 @@ const InternalCountDown: ForwardRefRenderFunction<
289
290
[ `${ classPrefix } -number-text` ] : type === 'text' ,
290
291
} ) }
291
292
>
292
- { padZero ( time ) }
293
+ { unit ? padZero ( time ) : time }
293
294
</ View >
294
295
{ unit ? (
295
296
< View className = { `${ classPrefix } -unit` } > { getUnit ( unit ) } </ View >
@@ -321,7 +322,7 @@ const InternalCountDown: ForwardRefRenderFunction<
321
322
'S' ,
322
323
padZero ( ms , 3 )
323
324
. toString ( )
324
- . slice ( 0 , digit || 2 )
325
+ . slice ( 0 , digit || 1 )
325
326
) }
326
327
</ >
327
328
)
You can’t perform that action at this time.
0 commit comments