2
0
mirror of https://github.com/frappe/books.git synced 2024-11-08 23:00:56 +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')"
/>
<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>
<component :is="Component" class="flex-1" />
<component :is="Component" class="flex-1" :key="$route.path" />
</keep-alive>
</router-view>
<div class="flex" v-if="showQuickEdit">
<router-view
:key="$route.query.doctype + $route.query.name"
name="edit"
v-slot="{ Component }"
>
<router-view name="edit" v-slot="{ Component }">
<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>
</router-view>
</div>