2👍
✅
You can actually pass a function as the default
property:
props: {
name: {
type: String,
required: true,
default() {
return 'user ID: ' + this.$route.params.user_id;
}
}
}
Source:stackexchange.com