-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
DOM properties breaks in stringified nodes #1128
Comments
I don't get the problem with you.Can you explain it detaily with this?I find nothing with problem after check the link you provider.
|
@underfin The |
Got it.The bahavior what |
@gzzhanghao Please give more details next time you open an issue: be precise about what is expected and missing like the attribute name. without the second comment, it is very difficult to understand. You are setting an HTML attribute, so it makes sense it is set as an attribute. Props are set as props when using |
In Vue 3 the idea is Vue auto detects prop vs. attributes. I think there should be some intuition from the compiler to avoid stringifying nodes with prop-only bindings, even static. |
it is better if it is possible stringfy other div node. |
@underfin @posva Sorry for the confusion. But the real problem here is that stringified node behaves differently with non-stringified one. It may cause confusion in development since the optimization happens automatically - things can break without any relevant update. A possible solution is adding BTW, _createBlock("input", { indeterminate: }, null, 8 /* PROPS */, ["indeterminate"]) While // Vue template compilation error: v-bind is missing expression.(31)
_createBlock("input", { indeterminate: "" }, null, 8 /* PROPS */, ["indeterminate"]) |
If binding as a prop it should be |
@yyx990803 Correct, but I think Meanwhile, I wonder if we should handle custom properties here, so we can put raw data objects on elements (source locations, for example). |
Version
v3.0.0-beta.9
Reproduction link
vue-next-template-explorer
Steps to reproduce
Set DOM properties in stringified nodes.
What is expected?
Set properties correctly.
What is actually happening?
Properties are treated as attribute.
The text was updated successfully, but these errors were encountered: