Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The template does not define the corresponding attribute, and assigns a number type directly through el, throw an wran of a string #5793

hcg1023 opened this issue Apr 24, 2022 · 1 comment


Copy link

hcg1023 commented Apr 24, 2022



Reproduction link

Steps to reproduce

Define a props of type number and assign it directly to el, throwing a warning that the value is a string and that the value type in state becomes a string

What is expected?

It is a value of type number

What is actually happening?

It is a string

hcg1023 added a commit to hcg1023/core that referenced this issue Apr 24, 2022
…signs a number type directly through el, throw an wran of a string vuejs#5793
Copy link

hcg1023 commented Apr 24, 2022

This problem is mainly caused by the fact that when I define a test case, I assign a property value through EL and discover that the assignment is wrong. If I do not assign a value through setAttribute first, the value will never be a number, And I think there are scenarios for assigning values through the JS API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging a pull request may close this issue.

2 participants