Vue: fix UserCard not always showing the username

This commit is contained in:
Marco Realacci 2022-12-24 20:48:07 +01:00
parent 1ffa5355be
commit b663aa28dd

View file

@ -2,6 +2,9 @@
export default { export default {
props: ["user_id", "name", "followed", "banned", "show_new_post"], props: ["user_id", "name", "followed", "banned", "show_new_post"],
watch: { watch: {
name: function (new_val, old_val) {
this.username = new_val;
},
banned: function (new_val, old_val) { banned: function (new_val, old_val) {
this.user_banned = new_val; this.user_banned = new_val;
}, },
@ -78,7 +81,7 @@ export default {
}) })
}, },
}, },
created() { mounted() {
}, },
} }
</script> </script>