Use query params
This commit is contained in:
parent
384728de07
commit
123d27e890
|
@ -58,6 +58,16 @@ export default {
|
|||
data: () => ({
|
||||
username: null
|
||||
}),
|
||||
watch: {
|
||||
username(newVal) {
|
||||
if (this.$route.query.username != newVal) {
|
||||
this.$router.push({ query: { username: this.username } })
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.username = this.$route.query.username
|
||||
},
|
||||
|
||||
apollo: {
|
||||
user: {
|
||||
|
|
Loading…
Reference in New Issue
Block a user