From e331cb2e68becebc7be0812bc9e98a1c2e780cdc Mon Sep 17 00:00:00 2001 From: sight <1453017105@qq.com> Date: Wed, 6 Apr 2022 21:11:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(fullscreen):=20=E4=BF=AE=E5=A4=8D=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E7=A7=BB=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/src/component/fullscreen/index.vue | 4 ++-- .../src/document/zh-CN/components/animation.md | 16 ++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/package/component/src/component/fullscreen/index.vue b/package/component/src/component/fullscreen/index.vue index 3ce85fa1..8ffd6586 100644 --- a/package/component/src/component/fullscreen/index.vue +++ b/package/component/src/component/fullscreen/index.vue @@ -205,8 +205,8 @@ onMounted(() => { onBeforeUnmount(() => { //@ts-ignore - document.addEventListener(fullscreenAPI.fullscreenchange, onFullscreenchange); - document.addEventListener("keydown", onFullscreenchange); + document.removeEventListener(fullscreenAPI.fullscreenchange, onFullscreenchange); + document.removeEventListener("keydown", onFullscreenchange); }); diff --git a/package/document/src/document/zh-CN/components/animation.md b/package/document/src/document/zh-CN/components/animation.md index 792f897d..1118e5d1 100644 --- a/package/document/src/document/zh-CN/components/animation.md +++ b/package/document/src/document/zh-CN/components/animation.md @@ -52,7 +52,7 @@
layui-anim-fadein
  • -
    渐隐
    +
    渐隐
    layui-anim-fadeout
  • @@ -72,13 +72,17 @@ import { ref } from 'vue' export default { setup() { - const replay = (e) => { + const replay = (e, aninClass) => { const el = e.currentTarget; const targetClass = el.classList[1]; - el.classList.remove(targetClass); - setTimeout(() => { - el.classList.add(targetClass); - },100) + if(!targetClass){ + el.classList.add(aninClass); + }else{ + el.classList.remove(targetClass); + setTimeout(() => { + el.classList.add(targetClass); + },100) + } } return { replay