From 8747782f0b23fa5d75d231bef90c2f505e410e78 Mon Sep 17 00:00:00 2001 From: songchenglin3 <353833373@qq.com> Date: Thu, 27 Jun 2024 10:13:52 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20demo=E5=A2=9E=E5=8A=A0header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/resultpage/demo.taro.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/packages/resultpage/demo.taro.tsx b/src/packages/resultpage/demo.taro.tsx index 8644d807a0..9db17f32ed 100644 --- a/src/packages/resultpage/demo.taro.tsx +++ b/src/packages/resultpage/demo.taro.tsx @@ -1,6 +1,7 @@ import React from 'react' import { ScrollView, View } from '@tarojs/components' import { useTranslate } from '@/sites/assets/locale/taro' +import Header from '@/sites/components/header' import Demo1 from './demos/taro/demo1' import Demo2 from './demos/taro/demo2' import Demo3 from './demos/taro/demo3' @@ -33,6 +34,7 @@ const ResultPageDemo = () => { }) return ( <> +
{translated.basic} From f133e8e62b1b9081a26be4cc33eaafcf1168cb49 Mon Sep 17 00:00:00 2001 From: songchenglin3 <353833373@qq.com> Date: Fri, 28 Jun 2024 10:00:00 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20rn=20copy=E8=84=9A=E6=9C=AC=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/rn/copy-file.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/rn/copy-file.js b/scripts/rn/copy-file.js index 111a4eca8f..337b0e22bb 100644 --- a/scripts/rn/copy-file.js +++ b/scripts/rn/copy-file.js @@ -54,6 +54,7 @@ const copyFile = async (from, to, success, isSingle = false) => { 'griditem', 'hoverbuttonitem', 'avatargroup', + 'icon', ].includes(item) ) { modify( @@ -61,10 +62,12 @@ const copyFile = async (from, to, success, isSingle = false) => { `import '../../../styles/demo.scss';\n` ) } - modify( - `${targetBaseUrl}/packages/${item}/${item}.taro.tsx`, - `import "./${item}.harmony.css";\n` - ) + if (!['icon'].includes(item)) { + modify( + `${targetBaseUrl}/packages/${item}/${item}.taro.tsx`, + `import "./${item}.harmony.css";\n` + ) + } } }) }) From c4a6a12cf2eac994f1722fb723ec56a2331cc6b4 Mon Sep 17 00:00:00 2001 From: songchenglin3 <353833373@qq.com> Date: Fri, 28 Jun 2024 11:43:58 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix(countdown):=20taro=E4=B8=8D=E5=8C=BA?= =?UTF-8?q?=E5=88=86=E5=9B=9B=E7=AB=AF=E5=AE=9E=E7=8E=B0=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/countdown/countdown.taro.tsx | 39 +++++------------------ 1 file changed, 8 insertions(+), 31 deletions(-) diff --git a/src/packages/countdown/countdown.taro.tsx b/src/packages/countdown/countdown.taro.tsx index f62ca76715..9a8bbcfeec 100644 --- a/src/packages/countdown/countdown.taro.tsx +++ b/src/packages/countdown/countdown.taro.tsx @@ -9,7 +9,7 @@ import React, { import { View } from '@tarojs/components' import { BasicComponent, ComponentDefaults } from '@/utils/typings' import { padZero } from '@/utils/pad-zero' -import { harmonyAndRn, web } from '@/utils/platform-taro' +import { web } from '@/utils/platform-taro' export interface CountDownTimeProps { d: number @@ -201,12 +201,6 @@ const InternalCountDown: ForwardRefRenderFunction< formatCache = formatCache.replace('SS', msC.slice(0, 1)) } } - formatCache = formatCache.replace( - /(\d+)/g, - type === 'primary' - ? `$1` - : `$1` - ) return formatCache } @@ -293,10 +287,6 @@ const InternalCountDown: ForwardRefRenderFunction< destroy && cancelAnimationFrame(stateRef.current.timer) } - const renderTime = (() => { - return formatRemainTime(stateRef.current.restTime) - })() - const getUnit = (unit: string) => { const formatArr = format.split(/(DD|HH|mm|ss|S)/) const index = formatArr.indexOf(unit) @@ -356,26 +346,13 @@ const InternalCountDown: ForwardRefRenderFunction< return ( <> {children || ( - <> - {!harmonyAndRn() ? ( - - ) : ( - - {renderTaroTime()} - - )} - + + {renderTaroTime()} + )} )