I have a component with the prop value and the prop range. range is of type Boolean and defaults to false. value should be of type String when range is false, and of type Array if range is true.
Currently, I only know how to specify that value can be of type String or Array, but not how to attach any kind of condition to it:
export default {
props: {
value: {
type: [String, Array]
},
range: {
type: Boolean,
default: false
}
}
}
Is this possible?