Page traduite Le contenu de cette page peut être déprécié.
Middleware de routage
Utiliser un middleware de routage pour définir une classe pour le corps afin que nous puissions ensuite le styliser différemment en fonction de la route.
Dans cet exemple :
store/class.js
définit une classe sur le corps.
middleware/class.js
utilise un middleware de routage pour définir une classe avant d'entrer dans la route.
components/Navigation.vue
change la taille de la police pour la route avec le nom de router-middleware
.
nuxt.config.js
contient la propriété router
pour activer le middleware.
En savoir plus dans le chapitre middleware .
Loading Sandbox...
Editer cette page sur GitHub
Mise à jour le jeu. 9 février 2023

























































