@@ -9,7 +9,7 @@ import React, {
9
9
import { View } from '@tarojs/components'
10
10
import { BasicComponent , ComponentDefaults } from '@/utils/typings'
11
11
import { padZero } from '@/utils/pad-zero'
12
- import { harmonyAndRn , web } from '@/utils/platform-taro'
12
+ import { web } from '@/utils/platform-taro'
13
13
14
14
export interface CountDownTimeProps {
15
15
d : number
@@ -201,12 +201,6 @@ const InternalCountDown: ForwardRefRenderFunction<
201
201
formatCache = formatCache . replace ( 'SS' , msC . slice ( 0 , 1 ) )
202
202
}
203
203
}
204
- formatCache = formatCache . replace (
205
- / ( \d + ) / g,
206
- type === 'primary'
207
- ? `<View class="nut-countdown-number-primary">$1</View>`
208
- : `<View class="nut-countdown-number">$1</View>`
209
- )
210
204
211
205
return formatCache
212
206
}
@@ -293,10 +287,6 @@ const InternalCountDown: ForwardRefRenderFunction<
293
287
destroy && cancelAnimationFrame ( stateRef . current . timer )
294
288
}
295
289
296
- const renderTime = ( ( ) => {
297
- return formatRemainTime ( stateRef . current . restTime )
298
- } ) ( )
299
-
300
290
const getUnit = ( unit : string ) => {
301
291
const formatArr = format . split ( / ( D D | H H | m m | s s | S ) / )
302
292
const index = formatArr . indexOf ( unit )
@@ -356,26 +346,13 @@ const InternalCountDown: ForwardRefRenderFunction<
356
346
return (
357
347
< >
358
348
{ children || (
359
- < >
360
- { ! harmonyAndRn ( ) ? (
361
- < View
362
- className = { `${ classPrefix } ${ className } ` }
363
- style = { { ...style } }
364
- { ...rest }
365
- dangerouslySetInnerHTML = { {
366
- __html : `${ renderTime } ` ,
367
- } }
368
- />
369
- ) : (
370
- < View
371
- className = { `${ classPrefix } ${ className } ` }
372
- style = { { ...style } }
373
- { ...rest }
374
- >
375
- { renderTaroTime ( ) }
376
- </ View >
377
- ) }
378
- </ >
349
+ < View
350
+ className = { `${ classPrefix } ${ className } ` }
351
+ style = { { ...style } }
352
+ { ...rest }
353
+ >
354
+ { renderTaroTime ( ) }
355
+ </ View >
379
356
) }
380
357
</ >
381
358
)
0 commit comments