devjin0617 / vue2-admin-lte

:bar_chart: adminLTE to vuejs v2.x converting project
https://devjin0617.github.io/vue2-admin-lte
MIT License
1.07k stars 323 forks source link

Side Menu not working properly when using with Laravel #55

Open stiffroy opened 6 years ago

stiffroy commented 6 years ago

I am using this package with my Laravel (v5.6) project. Things are going pretty well but I am having some issue with the side menu. Whenever I click on any menu link, the right template is rendered and the page is properly displayed. But the menu link is not set as 'active'. This is not a big issue but I am looking forward to solve this minor issue with your help. The route name and its relevant URL is something like this -> {domain_name}/#/{vue_route} . To mention here, the '#' comes by default from the settings of Laravel Mix and Webpack.

stiffroy commented 6 years ago

What I made out this far, was a different problem. It was nothing about the # but the main problem came with the class naming of the Vue-Router. So I have changed/overwritten the default routes active menu links as: linkActiveClass: '' and linkExactActiveClass: 'active' when building the Router. But the problem that I am still facing is, in the parent li element of the active link, which has a class of 'treeview' it gets a class called 'menu-open' which shouldn't be the case and should have a class named 'active'. Any clue on how to achieve this?

thond1st commented 5 years ago

Hi @stiffroy , I am also planning to use vue2-admin-lte with an old Laravel 5.4 project. Any chance you could share the steps you did for integration? Or tutorial links you might have used will be a lot of help. Having troubles like using the current Laravel routing. There will be existing pages that will not be translated to AdminLte yet. Still a newbie on Vue.JS :) Thanks in advance!