動的コンポーネントを生成するテーブルがあります。削除ボタンをクリックするか、他のものを処理する場合は削除したいと思います。 ここで何が間違っていたのですか?スプライスを試み、メソッドも削除されていません。 アドバイスをお願いします。動的に生成されたコンポーネントを削除するVueJS
<table>
<tr is="item-grid" v-for='index in counter'></tr>
<button @click="counter++" type="button">TEST ADD</button>
</table>
<template id="item-template">
<tr>
<td><input type="text" class="form-control" v-model="inventory_name" readonly/></td>
<td><input type="text" class="form-control" v-model="sku"/></td>
<td><input type="text" class="form-control" v-model="qty"/></td>
<td><input v-model="unit_price"></input></td>
<td><span v-text="unit_total"></span></td>
<td><button @click="remove(this)" type="button">delete</button></td>
</tr>
</template>
が、これはルート成分を返しますか?もしそうでなければ、親コンポーネントの内部から削除するだけです(例えば、 'v-if'を使って)。 – Cristy