동적 구성 요소를 생성하는 테이블이 있는데 제거 버튼을 클릭하거나 다른 것을 처리하려면 테이블을 제거하고 싶습니다. 내가 뭘 잘못 했니? 시도 스플 라이스 및 제거 방법도 작동하지 않습니다. 상담하십시오.동적으로 생성 된 구성 요소 삭제 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>
이 루트 compoment인가? 그렇지 않다면, 부모 컴포넌트 내부에서 그것을 제거하면됩니다 (예를 들어'v-if'로). – Cristy