handled home loading if not available in dom (if drupalSettings.path.isFront == false)
This commit is contained in:
@@ -28,6 +28,31 @@ export default {
|
||||
items: state => state.Search.items
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
...mapActions({
|
||||
newSearch: 'Search/newSearch'
|
||||
})
|
||||
},
|
||||
created() {
|
||||
// laucnh a search if params exists in url query
|
||||
console.log('Base created() location',window.location);
|
||||
let params = new URLSearchParams(window.location.search)
|
||||
if(params.has('keys')){
|
||||
this.$store.commit('Search/setKeys', params.get('keys'))
|
||||
this.newSearch()
|
||||
}
|
||||
},
|
||||
// beforeRouteEnter (to, from, next) {
|
||||
// console.log('Base beforeRouteEnter');//, to, from, next);
|
||||
// next()
|
||||
// },
|
||||
beforeRouteUpdate (to, from, next) {
|
||||
console.log('Base beforeRouteUpdate', to, from, next);
|
||||
this.$store.commit('Search/setKeys', to.query.keys)
|
||||
this.$store.commit('Search/setTerm', to.query.term)
|
||||
this.newSearch()
|
||||
next()
|
||||
},
|
||||
components: {
|
||||
Card
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user