Closed xiaowu55555 closed 8 months 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是正常的
和 transition 配合使用目前有 bug ~
使用transition后,监听route,打印to.params['stack-key-dir']的值一直是forward
不使用transition是正常的