metisMenu is a jQuery menu plugin I know it can work by jQuery code, but how to let it work when router is changed in vue js?
1 Answer
Vue works best if you let Vue manage everything with the Vue application. If your menu is part of the Vue application, I would recommend strongly against using a plugin to change the menu and instead use the tools Vue provide you to customise your menu however you like.
If you need to change something outside the Vue application based on route changes, you can use navigation guards to call some external function. Generally jQuery and Vue do not work together well, because they have different design philosophies, but you may be able to find something in your jQuery plugin that allows you to dynamically update the menu.