Open
Description
Version
2.6.10
Reproduction link
https://embed.plnkr.co/2KKE9ixZJLrRB6FUNIou/
Steps to reproduce
Steps to reproduce (see the attached plunkr):
- Create a web-component (not using Vue).
- Expose a 'value' property in this web component that accepts/returns non-string objects (e.g. a Date object).
- Instantiate the web component in Vue and bind the property using :value.prop syntax
What is expected?
The object is passed as is.
What is actually happening?
The object is converted to string before being set to the web-component 's property.
It is more and more common to include third party components written in other frameworks and directly use it in Vue.
However, it seems that the Vue code always expect the 'value' property to be of type string. Let's suppose to import a date selector as ES5 web custom component, that defines the 'value' property to be a Date object.
Vue will always pass this value as string instead. Using a different property name works as expected.