-
Notifications
You must be signed in to change notification settings - Fork 546
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
Custom Elements Interop Improvements #149
Conversation
just some thoughts:
(the pros:
con:
|
@backbone87 we are not considering any drastic template syntax change at this point. |
The idea of |
|
so are self-closing tags? They are really handy, I love them. |
@jods4 yeah, that's an exception for string-only templates (so are CamelCase components). We already have these special cases and it would be wise to avoid adding more, especially when you are not adding new capabilities. |
I provided an expanded form, which the browser should be able to parse |
Would the following pattern be removed (guide)? <table>
<!-- CustomRow resolves to a function or object, not a string -->
<tr :is="CustomRow">
<td>1</td>
</tr>
</table> As of today, my evergreen browser still parses: <table>
<custom-row>
<td>1</td>
</custom-row>
</table> Like the following: <custom-row></custom-row>
<table>
<tr>
<td>1</td>
</tr>
</table> |
@leopiccionia that's a good point. Maybe we need to introduce a separate <table>
<tr v-is="CustomRow">
<td>1</td>
</tr>
</table> And if the user registered <table>
<tr v-is="'CustomRow'">
<td>1</td>
</tr>
</table> |
see vuejs/rfcs#149 for details
@@ -28,8 +31,8 @@ The default generated render function code is (pseudo code): | |||
|
|||
```js | |||
function render() { | |||
const component_plastic_button = resolveComponent('plastic-button') | |||
return createVNode(component_plastic_button) | |||
const component_plastic_button = resolveComponent("plastic-button"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code style seems inconsistent with the later part of the RFC, maybe something wrong with the formatter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add a .prettierrc
file to make it automatic for people using a plugin with their IDE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
This RFC is now in final comments stage. An RFC in final comments stage means that: The core team has reviewed the feedback and reached consensus about the general direction of the RFC and believe that this RFC is a worthwhile addition to the framework. |
is
prop usage to the reserved<component>
tag only.v-is
directive to support 2.x use cases where is was used on native elements to work around native HTML parsing restrictions.Full Rendered Proposal