From b61cf457352b94b11361b06c970f75db38ead6ca Mon Sep 17 00:00:00 2001 From: sight <1453017105@qq.com> Date: Fri, 1 Apr 2022 00:45:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(docs):=20animation=20=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=92=AD=E6=94=BE=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/docs/zh-CN/components/animation.md | 33 ++++++++++++++-------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/example/docs/zh-CN/components/animation.md b/example/docs/zh-CN/components/animation.md index 142890c1..b5f9dac0 100644 --- a/example/docs/zh-CN/components/animation.md +++ b/example/docs/zh-CN/components/animation.md @@ -16,51 +16,51 @@
@@ -72,7 +72,16 @@ import { ref } from 'vue' export default { setup() { + const playAnimation = (e) => { + const el = e.currentTarget; + const targetClass = el.classList[1]; + el.classList.remove(targetClass); + setTimeout(() => { + el.classList.add(targetClass); + },100) + } return { + playAnimation } } }