From 13e32455e68cd13b36eebdbfeabd20fff23b5e11 Mon Sep 17 00:00:00 2001 From: xy <371661665@qq.com> Date: Thu, 26 Aug 2021 11:59:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=9C=A80.63.4=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E4=B8=ADDialog=E4=BC=9A=E5=B4=A9=E6=BA=83=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题在于新版本中,Animated.Value初始值只可以为数字 --- src/common/animations/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/animations/index.ts b/src/common/animations/index.ts index 506b982..7f8c50a 100644 --- a/src/common/animations/index.ts +++ b/src/common/animations/index.ts @@ -48,15 +48,15 @@ export class FadeAnimated extends CommonAnimated { } this.state.opacity = new Animated.Value( - this.getPropertyValue('opacity', true) + this.getPropertyValue('opacity', true) ?? 0 ) - this.state.scale = new Animated.Value(this.getPropertyValue('scale', true)) + this.state.scale = new Animated.Value(this.getPropertyValue('scale', true) ?? 0) this.state.translateX = new Animated.Value( - this.getPropertyValue('translateX', true) + this.getPropertyValue('translateX', true) ?? 0 ) this.state.translateY = new Animated.Value( - this.getPropertyValue('translateY', true) + this.getPropertyValue('translateY', true) ?? 0 ) }