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

添加transition后监听stack-key-dir一直是forward #150

Closed
xiaowu55555 opened this issue Jul 22, 2023 · 1 comment
Closed

添加transition后监听stack-key-dir一直是forward #150

xiaowu55555 opened this issue Jul 22, 2023 · 1 comment

Comments

@xiaowu55555
Copy link

xiaowu55555 commented Jul 22, 2023

使用transition后,监听route,打印to.params['stack-key-dir']的值一直是forward

<router-view v-slot="{ Component }">
    <vue-page-stack>
      <transition :name="transitionName">
        <component :is="Component" :key="$route.fullPath"></component>
      </transition>
    </vue-page-stack>
  </router-view>
watch(route, to => {
  if (to.params['stack-key-dir'] === 'forward') {
    console.log('forward')
  } else {
    console.log('back')
  }
})

不使用transition是正常的

@hezhongfeng
Copy link
Owner

hezhongfeng commented Jul 27, 2023

和 transition 配合使用目前有 bug ~

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

2 participants