2
0
mirror of https://github.com/frappe/books.git synced 2025-01-26 16:48:28 +00:00
books/src/pages/Desk.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.1 KiB
Vue
Raw Normal View History

2018-10-23 18:12:36 +05:30
<template>
<div class="flex overflow-hidden">
<Sidebar
class="w-sidebar flex-shrink-0 border-r"
@change-db-file="$emit('change-db-file')"
/>
<div class="flex flex-1 overflow-y-hidden bg-white">
<router-view v-slot="{ Component }">
<keep-alive>
<component :is="Component" class="flex-1" :key="$route.path" />
</keep-alive>
</router-view>
<div class="flex" v-if="showQuickEdit">
<router-view name="edit" v-slot="{ Component }">
<keep-alive>
<component
:is="Component"
class="w-quick-edit flex-1"
2022-04-28 12:04:55 +05:30
:key="$route.query.schemaName + $route.query.name"
/>
</keep-alive>
</router-view>
</div>
2018-10-23 18:12:36 +05:30
</div>
</div>
</template>
<script>
import Sidebar from '../components/Sidebar';
export default {
name: 'Desk',
emits: ['change-db-file'],
2018-10-23 18:12:36 +05:30
components: {
Sidebar,
2019-11-08 16:16:24 +05:30
},
computed: {
showQuickEdit() {
return (
this.$route.query.edit &&
2022-04-28 12:04:55 +05:30
this.$route.query.schemaName &&
2019-11-08 16:16:24 +05:30
this.$route.query.name
);
},
},
2019-07-19 18:54:31 +05:30
};
2018-10-23 18:12:36 +05:30
</script>