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

Is the transition hooks' call context right? #2287

Closed
TerenceZ opened this issue Feb 3, 2016 · 0 comments
Closed

Is the transition hooks' call context right? #2287

TerenceZ opened this issue Feb 3, 2016 · 0 comments

Comments

@TerenceZ
Copy link

TerenceZ commented Feb 3, 2016

If I apply a transition on a component A who isn't fragment, the transition hooks (resolved from B)' call contexts point to A, not the component B. For example following, I can't get the props I wanted to animate, because the this is pointing to inner instance, not the comp instance.

Have I missed something? Because I don't know why the context should be bound to the inner, and if I really want to access inner's props, I can access it through the $refs.inner...

<template>
<div>
  <inner transition="tran" v-show="visible"></inner>
</div>
<template>
<script>
export default {
  name: "comp",
  transitions: {
    tran: {
      enter(el, done) {
        // I want to access some props on `comp`, but the `this` points to `inner` instance:(
      }
    }
  }
}
</script>
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

1 participant