Issue on the props definition after update from 2.7.10 to 2.7.11
Version
2.7.11
Reproduction link
Steps to reproduce
After update the vue version from 2.7.10 to 2.7.11 the below prop declaration do not work anymore:
props: {
btnEditName: {
type: String,
required: false,
default () {
return this.$t('ui.common.edit');
},
},
}
Here is the error that I get on the browser:
vendor.js?id=1e442c890616af120be86f4594f164b7:2 TypeError: Cannot read properties of undefined (reading '_t') at I.t.$t (vendor.js?id=1e442c890616af120be86f4594f164b7:2489:558340) at a.default (app.js?id=76bc79b9d368bc3b9486130d861347b7:2:153982) at vendor.js?id=1e442c890616af120be86f4594f164b7:2489:692078 at qr (vendor.js?id=1e442c890616af120be86f4594f164b7:2489:692088) at o (vendor.js?id=1e442c890616af120be86f4594f164b7:2489:695159) at vendor.js?id=1e442c890616af120be86f4594f164b7:2489:695222 at t._init (vendor.js?id=1e442c890616af120be86f4594f164b7:2489:695235) at new a (vendor.js?id=1e442c890616af120be86f4594f164b7:2489:692574) at vendor.js?id=1e442c890616af120be86f4594f164b7:2489:685664 at init (vendor.js?id=1e442c890616af120be86f4594f164b7:2489:685695)
I rolledback to the version 2.7.10, and all works fine.
What is expected?
Declare a prop like
props: {
btnEditName: {
type: String,
required: false,
default () {
return this.$t('ui.common.edit');
},
},
}
What is actually happening?
This error:
vendor.js?id=1e442c890616af120be86f4594f164b7:2 TypeError: Cannot read properties of undefined (reading '_t') at I.t.$t (vendor.js?id=1e442c890616af120be86f4594f164b7:2489:558340) at a.default (app.js?id=76bc79b9d368bc3b9486130d861347b7:2:153982) at vendor.js?id=1e442c890616af120be86f4594f164b7:2489:692078 at qr (vendor.js?id=1e442c890616af120be86f4594f164b7:2489:692088) at o (vendor.js?id=1e442c890616af120be86f4594f164b7:2489:695159) at vendor.js?id=1e442c890616af120be86f4594f164b7:2489:695222 at t._init (vendor.js?id=1e442c890616af120be86f4594f164b7:2489:695235) at new a (vendor.js?id=1e442c890616af120be86f4594f164b7:2489:692574) at vendor.js?id=1e442c890616af120be86f4594f164b7:2489:685664 at init (vendor.js?id=1e442c890616af120be86f4594f164b7:2489:685695)