kopia lustrzana https://github.com/manuelkasper/sotlas-frontend
Add query parameters for pre-defined (not) activated by filters
rodzic
db846228ee
commit
644e6ce953
|
@ -116,6 +116,17 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted () {
|
||||
if (this.$route.query.activatedBy) {
|
||||
this.clearFilter()
|
||||
this.activatedByEnabled = true
|
||||
this.activatedBy = this.$route.query.activatedBy
|
||||
this.$router.replace({ path: this.$route.path })
|
||||
} else if (this.$route.query.notActivatedBy) {
|
||||
this.clearFilter()
|
||||
this.notActivatedByEnabled = true
|
||||
this.notActivatedBy = this.$route.query.notActivatedBy
|
||||
this.$router.replace({ path: this.$route.path })
|
||||
}
|
||||
this.updateFilter()
|
||||
},
|
||||
watch: {
|
||||
|
|
|
@ -406,10 +406,10 @@ export default {
|
|||
if (this.summit && this.summit.code) {
|
||||
hash = '#/summits/' + this.summit.code
|
||||
}
|
||||
let fullPath = url + hash
|
||||
if (!this.leavingRoute && this.$router.currentRoute.fullPath !== fullPath) {
|
||||
let path = url + hash
|
||||
if (!this.leavingRoute && this.$router.currentRoute.path !== path) {
|
||||
this.lastSetUrl = url
|
||||
this.$router.replace(fullPath)
|
||||
this.$router.replace({ path, query: this.$router.currentRoute.query })
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Ładowanie…
Reference in New Issue