Skip to content
Snippets Groups Projects
Commit 0d6a4cd5 authored by Pierre-Jean CHANCELLIER's avatar Pierre-Jean CHANCELLIER
Browse files

save history search in localstorage

parent 01247925
No related branches found
No related tags found
No related merge requests found
...@@ -58,6 +58,7 @@ export default { ...@@ -58,6 +58,7 @@ export default {
// Fonctions locales // Fonctions locales
methods: { methods: {
redirect(path) { redirect(path) {
localStorage.setItem('search', this.param)
this.$router.push({ path: path }) this.$router.push({ path: path })
} }
}, },
...@@ -82,6 +83,10 @@ export default { ...@@ -82,6 +83,10 @@ export default {
mounted () { mounted () {
// Mise à jour du fil d'ariane au chargement // Mise à jour du fil d'ariane au chargement
$nuxt.$emit('changeRoute',this.breadcrumb) $nuxt.$emit('changeRoute',this.breadcrumb)
// Rechargement du input
if (localStorage.search) {
this.param = localStorage.getItem('search')
}
} }
} }
</script> </script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment