Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reusable transitions with vue-router break in vue@2.1.6 (last one). Can reproduce. #4545

Closed
zhenyong opened this issue Dec 22, 2016 · 6 comments

Comments

@zhenyong
Copy link

zhenyong commented Dec 22, 2016

My initial purpose is to make transition in vue-router/examples/transitions reusable.

Before change codes, transition works as a's expected:

  1. vue-router@2.1.1 + vue@2.1.6 👍
    Expected https://jsfiddle.net/feipigzi/uqotvzft/3/

Click /parent and /parent/foo , make slide left or right transition.

After make resuable, unexpected:

  1. vue-router@2.1.1 + vue@2.1.6 (resuable transition) 👎
    Unexpected: https://jsfiddle.net/feipigzi/uqotvzft/

And I try to use older version vue.js, work as expected

  1. vue-router@2.1.1 + vue@2.0.0-rc.4 (resuable transition) 👍
    Expected: https://jsfiddle.net/feipigzi/uqotvzft/2/

Increase version, unexpected again:

  1. vue-router@2.1.1 + vue@2.0.0-rc.5 (resuable transition) 👎
    Unexpected: https://jsfiddle.net/feipigzi/uqotvzft/1
@zhenyong zhenyong changed the title Reusable Transitions break in vue@2.1.6 (last one). Can reproduce. Reusable transitions with vue-router break in vue@2.1.6 (last one). Can reproduce. Dec 22, 2016
@posva
Copy link
Member

posva commented Dec 22, 2016

I don't see the issue. 1 and 2 yields the same result
Can you give use more details please?

@zhenyong
Copy link
Author

zhenyong commented Dec 22, 2016

@posva
Slow down transition, click /parent then click /parent/foo, different dom class

  1. https://jsfiddle.net/feipigzi/uqotvzft/3/

  2. https://jsfiddle.net/feipigzi/uqotvzft/

@posva
Copy link
Member

posva commented Dec 22, 2016

ooh, one transition goes to the right instead of the left

@zuibunan
Copy link

I have a similar problem
vue2.1.7
vue-router2.1.1
vuex 2.1.1

app.vue

...
<keep-alive>
   <router-view ></router-view>
</keep-alive>
...

pageA.vue

<container ...>
</container>

component container.vue

  <transition @after-enter="onViewIn(0)" @after-leave="onViewOut(0)" :name="theTransitionName">
    <div class="container" :transition-name="theTransitionName">
      <slot></slot>
    </div>
  </transition>

transition component seems slow down one step when i use keep-alive and put transition component in each route view

this is my spa transition snapshots

1: first load
image

2: forward
image

3: back
image

@TiBianMod
Copy link

With vue@2.1.6+ I have also problems with the transitions.

Note: I'm using only Vue

<transition
        enter-active-class="transitionEnter"
        leave-active-class="transitionLeave"
>
    <div v-show="show">
        <slot></slot>
    </div>
</transition>

First I see the empty component and after start the transition,
is like the directive v-show is not working.

I hope this will be fixed in next version :)

@zuibunan
Copy link

My problem remains even though upgrade to 2.1.8, maybe I should provide a demo
#4545 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants