修改publicvendorlaravel-adminlaravel-admin里面的laravel-admin.js
$(window).on('load',function(){ $('.sidebar-menu a').each(function () { if (this.href === window.location.href){ $(this).parent().addClass('active') .closest('.treeview-menu') .addClass('.menu-open') .closest('.treeview') .addClass('active'); } }); });