✨ Refactor router-view to use scoped slots with dynamic component rendering
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<Transition name="view-transition" mode="out-in">
|
||||
<router-view />
|
||||
</Transition>
|
||||
<router-view v-slot="{ Component }">
|
||||
<Transition name="view-transition" mode="out-in">
|
||||
<component :is="Component" />
|
||||
</Transition>
|
||||
</router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user