ソースを参照

style: overlay transition animation

suzigang 4 年 前
コミット
4b77881bdb

+ 6 - 24
src/packages/__VUE/overlay/index.scss

@@ -1,9 +1,11 @@
-.overlay-fade-enter-active {
-  animation: nut-fade-in;
+.overlay-fade-enter-active,
+.overlay-fade-leave-active {
+  transition: opacity 0.5s ease;
 }
 
-.overlay-fade-leave-active {
-  animation: nut-fade-out;
+.overlay-fade-enter-from,
+.overlay-fade-leave-to {
+  opacity: 0;
 }
 
 .nut-overlay {
@@ -14,23 +16,3 @@
   height: 100%;
   background-color: $overlay-bg-color;
 }
-
-@keyframes nut-fade-in {
-  from {
-    opacity: 0;
-  }
-
-  to {
-    opacity: 1;
-  }
-}
-
-@keyframes nut-fade-out {
-  from {
-    opacity: 1;
-  }
-
-  to {
-    opacity: 0;
-  }
-}

+ 0 - 7
src/packages/__VUE/popup/index.taro.vue

@@ -190,13 +190,6 @@ export default create({
       emit('closed', e);
     };
     onMounted(() => {
-      // document.getElementById('app').appendChild(proxy.$el);
-      const query = wx.createSelectorQuery();
-      // console.log(query.in(proxy));
-      query.selectViewport().scrollOffset();
-      query.exec(res => {
-        // console.log(res[0].scrollTop)
-      });
       props.transition
         ? (state.transitionName = props.transition)
         : (state.transitionName = `popup-slide-${props.position}`);