Last active
July 16, 2019 02:19
-
-
Save dario61081/06aefc56f4340ee1cf64c12fe991135c to your computer and use it in GitHub Desktop.
vue.js render multiple tr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template v-show="datos" v-for="item, index in datos"> | |
<tr :key="index"> | |
<td class="date">[[item.fecha|todate]]</td> | |
<td>[[item.numero]]</td> | |
<td class="codigo">[[item.cuenta_codigo]]</td> | |
<td class="text-ellipsis" :title="item.descripcion">[[item.descripcion]]</td> | |
<td class="number">[[item.cotizacion|tonumber]]</td> | |
<td class="number">[[item.debe1|number]]</td> | |
<td class="number">[[item.haber1|number]]</td> | |
<td class="number">[[item.debe2|tonumber]]</td> | |
<td class="number">[[item.haber2|tonumber]]</td> | |
</tr> | |
<template v-if="datos[index+1]"> | |
<tr v-if="datos[index+1].numero > datos[index].numero"> | |
<td colspan="100"><i class="tag icon"></i>[[item.observacion]]</td> | |
</tr> | |
</template> | |
<template v-if="index===(datos.length-1)"> | |
<tr> | |
<td colspan="100"><i class="tag icon"></i>[[item.observacion]]</td> | |
</tr> | |
</template> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment