4paradigm / 4paradigm/FeatInsight

Update active menu item when watching the changes

Offen
#6 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @tobegit3hub Auf GitHub ansehen
Vorherrschende Sprache
Vue
Sterne
22
Forks
9
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Here is the example code.

```




Component A


Component B


Component C


Component D



export default {
data() {
return {
activeMenu: 'component-a',
};
},
watch: {
$route(to, from) {
this.activeMenu = to.name || 'component-a';
},
},
};

```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

The issue shows a Vue component with a menu that should update its active item based on route changes. The watch on $route is already present. Look for the component file in the repository, likely in a src/components or src/views directory. Check if the route names match the menu item keys. Verify the component works by running the app and navigating. The fix may involve ensuring the route name is correctly set or adjusting the key mapping.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
frontend
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.