2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 11:29:03 +00:00

refactor: move key to component

- lag seems to be gone 🤨
This commit is contained in:
18alantom 2022-02-11 19:03:28 +05:30
parent c6afe59033
commit 1626278938

View File

@ -5,20 +5,20 @@
@change-db-file="$emit('change-db-file')" @change-db-file="$emit('change-db-file')"
/> />
<div class="flex flex-1 overflow-y-hidden bg-white"> <div class="flex flex-1 overflow-y-hidden bg-white">
<router-view :key="$route.path" v-slot="{ Component }"> <router-view v-slot="{ Component }">
<keep-alive> <keep-alive>
<component :is="Component" class="flex-1" /> <component :is="Component" class="flex-1" :key="$route.path" />
</keep-alive> </keep-alive>
</router-view> </router-view>
<div class="flex" v-if="showQuickEdit"> <div class="flex" v-if="showQuickEdit">
<router-view <router-view name="edit" v-slot="{ Component }">
:key="$route.query.doctype + $route.query.name"
name="edit"
v-slot="{ Component }"
>
<keep-alive> <keep-alive>
<component :is="Component" class="w-80 flex-1" /> <component
:is="Component"
class="w-80 flex-1"
:key="$route.query.doctype + $route.query.name"
/>
</keep-alive> </keep-alive>
</router-view> </router-view>
</div> </div>