Answer the question
In order to leave comments, you need to log in
How to write the correct route?
There are two types of pages:
1) With a sidebar
2) Without a sidebar
By default, all pages are displayed with a sidebar:
<template>
<div id="app">
<MainLayout />
</div>
</template>
<template>
<div class="pages">
<Menu />
<router-view />
</div>
</template>
Answer the question
In order to leave comments, you need to log in
For example so.
These are routes where you can create your own meta.
{
name: 'myHomePage',
path: '/',
component: HomePage,
meta: { sideBar: true }
},
{
name: 'Products',
path: '/',
component: ProductsPage,
meta: { sideBar: false }
},
<Menu />
<Menu v-if="$route.meta && $route.meta.sideBar" />
#menu + .myRouteWrapper{
width: calc(100% - var(--menuWidth))
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question