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