hezhongfeng / vue-page-stack

Routing and navigation for your Vue SPA. Vue3.0 单页应用导航管理器
https://vue-page-stack-example.onrender.com
MIT License
718 stars 80 forks source link

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

Closed xiaowu55555 closed 8 months ago

xiaowu55555 commented 1 year ago

使用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 commented 1 year ago

和 transition 配合使用目前有 bug ~