From 25459b98039c0ed1133637b88406c68101b2eda1 Mon Sep 17 00:00:00 2001 From: daiwanxing Date: Sat, 13 Jul 2024 14:33:48 +0800 Subject: [PATCH 1/3] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=20popover=20?= =?UTF-8?q?=E6=98=BE=E7=A4=BA/=E9=9A=90=E8=97=8F=E8=BF=87=E6=B8=A1?= =?UTF-8?q?=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/__VUE/popover/index.scss | 26 +++---- src/packages/__VUE/popover/index.taro.vue | 94 +++++++++-------------- 2 files changed, 48 insertions(+), 72 deletions(-) diff --git a/src/packages/__VUE/popover/index.scss b/src/packages/__VUE/popover/index.scss index 233d6059ec..f43b8e2968 100644 --- a/src/packages/__VUE/popover/index.scss +++ b/src/packages/__VUE/popover/index.scss @@ -103,11 +103,21 @@ &-group { display: block; - // position: relative; height: 100%; width: 100%; } + &-enter-from, + &-leave-to { + transform: scale(0.8); + opacity: 0; + } + + &-enter-active, + &-leave-active { + transition-timing-function: ease; + } + .nut-popover-menu-item { display: flex; align-items: center; @@ -226,20 +236,6 @@ } } -.nut-popover-enter-from, -.nut-popover-leave-active { - transform: scale(0.8); - opacity: 0; -} - -.nut-popover-enter-active { - transition-timing-function: ease-out; -} - -.nut-popover-leave-active { - transition-timing-function: ease-in; -} - .nut-popover-content-bg { position: fixed; height: 100%; diff --git a/src/packages/__VUE/popover/index.taro.vue b/src/packages/__VUE/popover/index.taro.vue index 73b0f149de..d26cd98ee2 100644 --- a/src/packages/__VUE/popover/index.taro.vue +++ b/src/packages/__VUE/popover/index.taro.vue @@ -6,8 +6,7 @@ class="nut-popover-wrapper" @click="openPopover" > - +