A
A
Anton Anton2017-07-28 15:39:58
JavaScript
Anton Anton, 2017-07-28 15:39:58

Component of two table rows?

How to repeat with a component the same thing done via https://jsfiddle.net/1Lgn09o5/13/<template v-for="">

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Timofey, 2017-07-28
@mr_T

To repeat - no way. Each component should have a single top-level element, and there's nothing you can do about it. So either through the tbody, as mentioned above, or split into several components, or leave everything in the template v-for loop.

E
Evgeny Kulakov, 2017-07-28
@kulakoff Vue.js

There was a similar question just a couple of days ago, the point is to wrap it in the tbody in the component:

<tbody>
  <tr><td colspan=2>Строка {{elem}}</td></tr>
  <tr><td>лево</td><td>право</td></tr>
</tbody>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question