I've never seen data type constraints specified like this before; only props. Is there some documentation to back this approach up?
Aug 30, 2022
3
Level 63
Initial value of data set to null for Number format
Hello,
I have these data declared in my component. pathId need to be a Number, but when I load this component, pathId is null (it's normal).
So I get a warning saying that pathId should be a number. How is it possible to tell VueJS that pathId has to be a number or to be null ? So that I don't get any warning.
data() {
return {
pathId: Number,
pathDialog: false,
}
},
Thanks ;).
V
Level 104
1 like
Please or to participate in this conversation.