2018-10-23 18:12:36 +05:30
|
|
|
<template>
|
2019-12-23 16:07:30 +05:30
|
|
|
<div class="flex overflow-hidden">
|
2022-02-03 16:25:21 +05:30
|
|
|
<Sidebar
|
2022-05-31 14:39:06 +05:30
|
|
|
class="w-sidebar flex-shrink-0 border-r"
|
2022-02-03 16:25:21 +05:30
|
|
|
@change-db-file="$emit('change-db-file')"
|
|
|
|
/>
|
2019-10-13 17:33:01 +05:30
|
|
|
<div class="flex flex-1 overflow-y-hidden bg-white">
|
2022-02-11 19:03:28 +05:30
|
|
|
<router-view v-slot="{ Component }">
|
2019-10-11 15:25:50 +05:30
|
|
|
<keep-alive>
|
2022-02-11 19:03:28 +05:30
|
|
|
<component :is="Component" class="flex-1" :key="$route.path" />
|
2019-10-11 15:25:50 +05:30
|
|
|
</keep-alive>
|
2022-02-10 12:11:51 +05:30
|
|
|
</router-view>
|
|
|
|
|
|
|
|
<div class="flex" v-if="showQuickEdit">
|
2022-02-11 19:03:28 +05:30
|
|
|
<router-view name="edit" v-slot="{ Component }">
|
2022-02-10 12:11:51 +05:30
|
|
|
<keep-alive>
|
2022-02-11 19:03:28 +05:30
|
|
|
<component
|
|
|
|
:is="Component"
|
2022-07-12 15:53:41 +05:30
|
|
|
class="w-quick-edit flex-1"
|
2022-04-28 12:04:55 +05:30
|
|
|
:key="$route.query.schemaName + $route.query.name"
|
2022-02-11 19:03:28 +05:30
|
|
|
/>
|
2022-02-10 12:11:51 +05:30
|
|
|
</keep-alive>
|
|
|
|
</router-view>
|
2019-10-11 15:25:50 +05:30
|
|
|
</div>
|
2018-10-23 18:12:36 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
import Sidebar from '../components/Sidebar';
|
|
|
|
export default {
|
|
|
|
name: 'Desk',
|
2022-02-10 17:27:31 +05:30
|
|
|
emits: ['change-db-file'],
|
2018-10-23 18:12:36 +05:30
|
|
|
components: {
|
2022-02-03 16:25:21 +05:30
|
|
|
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
|
|
|
|
);
|
2022-02-03 16:25:21 +05:30
|
|
|
},
|
|
|
|
},
|
2019-07-19 18:54:31 +05:30
|
|
|
};
|
2018-10-23 18:12:36 +05:30
|
|
|
</script>
|