D
D
Denioo2020-06-17 11:24:30
JavaScript
Denioo, 2020-06-17 11:24:30

How to put one Layout inside another in vue?

Hello, there is a layout and inside it you need to place another layout so that this layout switches when you select some link in the top layout navbar (2 links). The routes, respectively, should also be like this:
for the top layout:
/topLayout
for the bottom layout:
/topLayout/botlayout
How can this be implemented?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Aetae, 2020-06-17
@Denioo

If vue-router is used, then in the top it's just , and in it's just:<router-view>routes

{
  path: '/topLayout',
  component: 'topLayout',
  children: [
    {
      path: ':botlayout?',
      component: 'botlayout',
    },
  ]
}

A
Anton Anton, 2020-06-17
@Fragster

I think all the answers to the questions will be here: https://router.vuejs.org/en/guide/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question