Vue.delete( target, propertyName/index )

Vue.delete( target, propertyName/index )

Arguments:
    {Object | Array} target
    {string | number} propertyName/index

    Only in 2.2.0+: Also works with Array + index.

Usage:

Delete a property on an object. If the object is reactive, ensure the deletion triggers view updates. This is primarily used to get around the limitation that Vue cannot detect property deletions, but you should rarely need to use it.

The target object cannot be a Vue instance, or the root data object of a Vue instance.

See also: Reactivity in Depth
发布了133 篇原创文章 · 获赞 189 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/blog_programb/article/details/105603332