props: {
rules: {
type: Array,
required: false,
default: () => [
(file) => !file
|| file.size < 10000000
|| this.getJsonDataByLocale.less_than_10mb_message,
(file) => !file
|| ACCEPTED_FILE_TYPES.includes(file.type)
|| this.getJsonDataByLocale.wrong_file_message,
],
}
}
This component is designed to have generic functionality. I am attempting to set the rules default value to a computed property named 'this.getJsonDataByLocale'. This computed property serves as a getter.
However, there seems to be an issue with Vue's lifecycle rendering process, where props are rendered before computed properties are resolved. As a result, the component does not have access to fetch data from the computed property.
I require using 'this.getJsonDataByLocale' because the error message needs to be dynamically generated based on its value.
Does anyone have any advice or suggestions on how to resolve this situation?