From c3a3f49c7ddafbcd2932d61137f4f2252995d675 Mon Sep 17 00:00:00 2001 From: yanyilin Date: Wed, 10 Jan 2024 17:06:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8Dweb=E7=AB=AF=EF=BC=8CsetPrope?= =?UTF-8?q?rty=E7=9A=84=E5=B1=9E=E6=80=A7=E5=90=8D=E7=A7=B0=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=94=B1=E9=A9=BC=E5=B3=B0=E5=AD=97=E7=AC=A6=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E4=BD=BF=E7=94=A8"-"=E8=BF=9E=E6=8E=A5=E5=AD=97?= =?UTF-8?q?=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/template/half-screen/half-screen.uvue | 22 ++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pages/template/half-screen/half-screen.uvue b/pages/template/half-screen/half-screen.uvue index f3b56f1b..5d8a653e 100644 --- a/pages/template/half-screen/half-screen.uvue +++ b/pages/template/half-screen/half-screen.uvue @@ -34,7 +34,7 @@ }, methods: { onHalfTouchStart(_ : TouchEvent) { - this.halfNode?.style?.setProperty('transitionDuration', 0); + this.halfNode?.style?.setProperty('transition-duration', 0); }, onHalfTouchMove(e : TouchEvent) { if (this.bAnimation) {//容错处理 @@ -98,30 +98,30 @@ if (show) { top = this.totalHeight * 30 / 100; //计算显示的位置 this.halfNode?.style?.setProperty('visibility', 'visible'); - this.halfNode?.style?.setProperty('transitionTimingFunction', 'ease-in-out'); + this.halfNode?.style?.setProperty('transition-timing-function', 'ease-in-out'); } else { - this.halfNode?.style?.setProperty('transitionTimingFunction', 'linear'); + this.halfNode?.style?.setProperty('transition-timing-function', 'linear'); time *= (this.halfHeight / this.totalHeight); //计算关闭动画时间 } - this.halfNode?.style?.setProperty('transitionDuration', time.toFixed(0)+"ms"); - this.halfNode?.style?.setProperty('transitionProperty', 'top'); + this.halfNode?.style?.setProperty('transition-duration', time.toFixed(0)+"ms"); + this.halfNode?.style?.setProperty('transition-property', 'top'); this.halfNode?.style?.setProperty('top', top.toFixed(2)); setTimeout(() => { if (!show) { this.halfNode?.style?.setProperty('visibility', 'hidden'); - this.halfNode?.style?.setProperty('transitionDuration', 0); + this.halfNode?.style?.setProperty('transition-duration', 0); this.halfNode?.style?.setProperty('transform', ''); } - this.halfNode?.style?.setProperty('transitionProperty', ''); + this.halfNode?.style?.setProperty('transition-property', ''); this.bAnimation = false; }, time) this.bAnimation = true; }, resumeHalfScreen() { let time = 300;//(500*this.halfOffset/this.halfHeight).toFixed(0); //回弹动画时间 - this.halfNode?.style?.setProperty('transitionDuration', time.toFixed(0)+"ms"); - this.halfNode?.style?.setProperty('transitionTimingFunction', 'ease-in-out'); - this.halfNode?.style?.setProperty('transitionProperty', 'transform'); + this.halfNode?.style?.setProperty('transition-duration', time.toFixed(0)+"ms"); + this.halfNode?.style?.setProperty('transition-timing-function', 'ease-in-out'); + this.halfNode?.style?.setProperty('transition-property', 'transform'); this.halfNode?.style?.setProperty('transform', 'translateY(0px)'); this.halfMove = false; this.scrollNode?.setAttribute('scroll-y', 'true'); @@ -129,7 +129,7 @@ this.halfOffset = 0; setTimeout(() => { this.bAnimation = false; - this.halfNode?.style?.setProperty('transitionProperty', ''); + this.halfNode?.style?.setProperty('transition-property', ''); }, time) this.bAnimation = true; } -- GitLab