Cómo generar un directorio de índice para el contenido capturado por v-html de vue.js
< lt;/div>
nuevo Vue({
el: 'cuerpo',
datos: {
artículos: [
{ text: 'bus' },
{ text: 'express' },
{ text: 'taxi' },
{ text: 'coche' },
{ text: 'autostop' },
{ text: 'taxi' },
{ text: 'chofer' }
]
},
métodos: {
onclick: function(evento){
event.preventDefault();
let target = event.target
console.log( target.getAttribute("índice de datos "));
document.getElementById('index').value = target.getAttribute("data-index");
}
}
})