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

Closed
hcg1023 opened this issue Apr 24, 2022 · 1 comment

Comments

@hcg1023
Copy link

hcg1023 commented Apr 24, 2022

Version

3.2.33

Reproduction link

sfc.vuejs.org/

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
@hcg1023
Copy link
Author

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.
image

@LinusBorg LinusBorg removed this from Issues in Custom Elements Bugsquash Jun 25, 2022
chrislone pushed a commit to chrislone/core that referenced this issue Feb 4, 2023
zhangzhonghe pushed a commit to zhangzhonghe/core that referenced this issue Apr 12, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants