Я создаю компонент таблицы Vue, и у меня есть элементы и столбцы.
items: [
{
'id':'1',
'title': '<input type="text">',
'description': '<input type="text">',
'price': '<input type="number">'
},
{
'id':'2',
'title': '<input type="text">',
'description': '<input type="text">',
'price': '<input type="number">'
}
],
columns: [ 'id', 'title', 'description', 'price']
И мой шаблон
<table class="table">
<thead>
<tr>
<th v-for="(column, index) in columns" :key="index"> {{column}}</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in items" :key="index">
<td v-for="(column, indexColumn) in columns" :key="indexColumn" v-html="item[column]"></td>
</tr>
</tbody>
</table>
Hove i bint v-on: событие keyup только для столбца цены?Я хочу, чтобы только в столбце цены был триггер для расчета метода.
methods: {
calculate: function () {
// to do...
}
}