From d84382529a3eeae75dff8aee66555a7fd28468e9 Mon Sep 17 00:00:00 2001 From: zhanglei Date: Mon, 21 Apr 2025 16:54:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85animate=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/animate/animate.uvue | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/pages/API/animate/animate.uvue b/pages/API/animate/animate.uvue index bebb3485..90967a6c 100644 --- a/pages/API/animate/animate.uvue +++ b/pages/API/animate/animate.uvue @@ -88,6 +88,11 @@ 修改背景色(关键帧) + + 修改opacity(关键帧) + + @@ -338,6 +343,24 @@ duration: 1000, fill: "forwards" }) + }, + opacityProperty(e : UniPointerEvent){ + e.currentTarget?.animate([ + { + offset: 0.3, + opacity: "1" + }, + { + offset: 0.6, + opacity: "0.1" + }, + { + opacity: "1" + } + ], { + duration: 1000, + fill: "forwards" + }) } } } -- GitLab