refactor: refs #7014 improved route.js & deleted RouteMain
This commit is contained in:
parent
f596a9b5f7
commit
33ad8fcb9d
|
@ -1,8 +1,16 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import LeftMenu from 'components/LeftMenu.vue';
|
import LeftMenu from 'components/LeftMenu.vue';
|
||||||
|
import { onMounted } from 'vue';
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
const $props = defineProps({
|
||||||
|
leftDrawer: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
onMounted(() => (stateStore.leftDrawer = $props.leftDrawer));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
<script setup>
|
|
||||||
import VnSectionMain from 'components/common/VnSectionMain.vue';
|
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
|
||||||
import { onMounted } from 'vue';
|
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
|
||||||
onMounted(() => (stateStore.leftDrawer = false));
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<VnSectionMain />
|
|
||||||
</template>
|
|
|
@ -19,6 +19,9 @@ export default {
|
||||||
path: '/route',
|
path: '/route',
|
||||||
name: 'RouteMain',
|
name: 'RouteMain',
|
||||||
component: () => import('src/components/common/VnSectionMain.vue'),
|
component: () => import('src/components/common/VnSectionMain.vue'),
|
||||||
|
props: {
|
||||||
|
leftDrawer: false,
|
||||||
|
},
|
||||||
redirect: { name: 'RouteList' },
|
redirect: { name: 'RouteList' },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue