2

$remove を使用して配列要素を削除しようとしています。しかし、 this.posts.$remove は関数ではないと言っています。誰がどこが間違っているのか説明できますか?

<button type="button" class="btn btn-danger" @click="deletePost(post.id)">Xxx</button>

ビューインスタンス:

deletePost(postId){
        console.log(postId);
        this.posts.$remove(postId);
      },

これは私のサンプルデータです

私のデータ

これは私のコンソールです

ここに画像の説明を入力

4

1 に答える 1