Skip to content

vue(3) and vue-router(4) and typescript -- base sidebar config

Notifications You must be signed in to change notification settings

pxls00/simple-sidebar-vue3-ts

Repository files navigation

#simple sidebar

Vue-3 + Vue Router + Pinia + Typescript + Vite

@ = '.src/'

step-1

Create the route you need in the sidebar section '@/constants/sidebar-routes'

step-2

Before creating routes, it must be added to the routes interface '@/interfaces/routes'

step-3

After adding it to the Routes interface, you can creat route in routes '@/router'

step-4

But they must also be added to helper routes for the getRoutePath helper function to work!! '@/helpers/routes'


If you say "why do you need the helper function getRoutePath", it will find routes for you by url and assign it to the router as an object.


Basic View

basic view You can write your own styles



you can open as many nested routes as you want in, the sidebar will generate them for you internally