Skip to content

Commit bffedab

Browse files
committed
fix typo and clarify language for Vue.delete API
1 parent 32b6799 commit bffedab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/v2/api/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,14 @@ type: api
254254

255255
- **Arguments:**
256256
- `{Object | Array} target`
257-
- `{string | number} key`
257+
- `{string | number} key/index`
258+
259+
> Only works with Array + index in 2.2.0+.
258260
259261
- **Usage:**
260262

261263
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.
262264

263-
> Also works with on Array + index in 2.2.0+.
264-
265265
<p class="tip">The target object cannot be a Vue instance, or the root data object of a Vue instance.</p>
266266

267267
- **See also:** [Reactivity in Depth](../guide/reactivity.html)

0 commit comments

Comments
 (0)