1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Vue.jsで連想配列の要素を削除するには

Last updated at Posted at 2019-07-01

Vue.jsで配列要素をレンダリングに反映されるよう削除するには

Vue.obj.splice(インデックス番号, 削除数)

を使いますが、連想配列ではspliceは使えません。

Vue.$delete(配列, キー)
Vue.$delete(ary, 'id')

を使います。
要素追加の際の

Vue.$set(配列, キー, 値)

と似てますね。

1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?