[Vuejs]-How to handle different toolbars for different pages in vue.js

0👍

I had something similar task and what i did:

Make component-wrapper <MyToolBar /> and in it use:

<component :is='computedComponent'></component>

In this component u should just import yours toolbars.

If u use a vue-router, u can use hooks to listen page route.
Or u can use props.

well, i don’t know is it the right solution, but it worked in my case

0👍

You could potentially make use of slots if there isn’t any major differences between the toolbars. Read more about them here. Hope this helps 🙂

Leave a comment