-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
Version
2.3.3
Reproduction link
https://jsfiddle.net/rafi16d/puwcs9ay/
Steps to reproduce
I would like to iterate recursively on an objects to get a nested table.
I have this template:
<script type="text/x-template">
<tr>
<td><a v-on:click="toggle">[ ]</a></td>
<td>...</td>
</tr>
<tr is="row-item" v-show="open" ...></tr>
</script>It's recursive, so each line tr has an other hidden line tr below.
When the user click on the [ ] on the parent line, the children lines will appear.
I already try to wrap the content within a tbody tag, but then I get tbody inside tbody, which is still an illegal table layout and breaks it.
<script type="text/x-template">
<tbody>
<tr>
<td>...</td>
<td>...</td>
</tr>
<tr is="row-item" ...></tr>
</tbody>
</script>Vue@1.x doesn't require exactly one root element. How can I do without ?
Any idea on how to solve this?
Thanks.
What is expected?
Use multiple elements in template. Or another solution.
What is actually happening?
Error: Component template should contain exactly one root element
MSCAU
Metadata
Metadata
Assignees
Labels
No labels