From 3c07b6d6bc5e1c86cc0217063f976faf395af960 Mon Sep 17 00:00:00 2001 From: robin Date: Wed, 6 Dec 2023 23:40:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(h5):=20=E8=A7=A3=E5=86=B3=20AtNoticebar=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=9C=A8=20web=20=E7=AB=AF=E5=8D=A1=E9=A1=BF?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=20#1714?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/taro-ui/src/components/noticebar/index.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/taro-ui/src/components/noticebar/index.tsx b/packages/taro-ui/src/components/noticebar/index.tsx index c1a5dd9b..2a1ee01c 100644 --- a/packages/taro-ui/src/components/noticebar/index.tsx +++ b/packages/taro-ui/src/components/noticebar/index.tsx @@ -25,7 +25,7 @@ export default class AtNoticebar extends React.Component< animationData: { actions: [{}] }, - dura: 15, + dura: 0, isWEAPP: Taro.getEnv() === Taro.ENV_TYPE.WEAPP, isALIPAY: Taro.getEnv() === Taro.ENV_TYPE.ALIPAY, isWEB: Taro.getEnv() === Taro.ENV_TYPE.WEB @@ -135,8 +135,13 @@ export default class AtNoticebar extends React.Component< const innerClassName = ['at-noticebar__content-inner'] if (marquee) { close = false - style['animation-duration'] = `${dura}s` innerClassName.push(animElemId) + style['animation-delay'] = '3s' + + if (dura > 0) { + style['animation-duration'] = `${dura}s` + style['animation-delay'] = '1s' + } } const classObject = {