Skip to content
This repository has been archived by the owner on Aug 8, 2022. It is now read-only.

chore: typos #120

Merged
merged 1 commit into from
Sep 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/api/application-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ app.directive('focus', {

#### prevNode

上一个虚拟结点,仅在 `beforeUpdate` 和 `updated` 钩子中可用。
上一个虚拟节点,仅在 `beforeUpdate` 和 `updated` 钩子中可用。

:::tip Note
除了 `el` 之外,你应该将这些参数视为只读,并且永远不要修改它们。如果你需要跨钩子共享信息,建议通过元素的[自定义数据属性集](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset)进行共享。
Expand Down
6 changes: 3 additions & 3 deletions src/guide/migration/key-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ badges:

- **NEW**:对于 `v-if`/`v-else`/`v-else-if` 的各分支项 `key` 将不再是必须的,因为现在 Vue 会自动生成唯一的 `key`。
- **BREAKING**:如果你手动提供 `key`,那么每个分支必须使用唯一的 `key`。你不能通过故意使用相同的 `key` 来强制重用分支。
- **BREAKING**:`<template v-for>` 的 `key` 应该设置在 `<template>` 标签上 (而不是设置在它的子结点上)。
- **BREAKING**:`<template v-for>` 的 `key` 应该设置在 `<template>` 标签上 (而不是设置在它的子节点上)。

## 背景

Expand Down Expand Up @@ -54,7 +54,7 @@ Vue 2.x 建议在 `v-if`/`v-else`/`v-else-if` 的分支中使用 `key`。

## 结合 `<template v-for>`

在 Vue 2.x 中 `<template>` 标签不能拥有 `key`。不过你可以为其每个子结点分别设置 `key`。
在 Vue 2.x 中 `<template>` 标签不能拥有 `key`。不过你可以为其每个子节点分别设置 `key`。

```html
<!-- Vue 2.x -->
Expand All @@ -74,7 +74,7 @@ Vue 2.x 建议在 `v-if`/`v-else`/`v-else-if` 的分支中使用 `key`。
</template>
```

类似地,当使用 `<template v-for>` 时存在使用 `v-if` 的子结点,`key` 应改为设置在 `<template>` 标签上。
类似地,当使用 `<template v-for>` 时存在使用 `v-if` 的子节点,`key` 应改为设置在 `<template>` 标签上。

```html
<!-- Vue 2.x -->
Expand Down