Skip to content

Commit f97b531

Browse files
authored
Merge pull request #580 from athena0304/patch-1
Update index.md
2 parents 1de9402 + 14d9e24 commit f97b531

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/v2/style-guide/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ computed: {
15371537

15381538
**如果一组 `v-if` + `v-else` 的元素类型相同,最好使用 `key` (比如两个 `<div>` 元素)。**
15391539

1540-
默认情况下,Vue 会尽可能高效的更新 DOM。这意味着其在相同类型的元素之间切换时,会修补以存在的元素,而不是将旧的元素移除然后在同一位置添加一个新元素。如果本不相同的元素被识别为相同,则会出现[意料之外的副作用](https://jsfiddle.net/chrisvfritz/bh8fLeds/)
1540+
默认情况下,Vue 会尽可能高效的更新 DOM。这意味着其在相同类型的元素之间切换时,会修补已存在的元素,而不是将旧的元素移除然后在同一位置添加一个新元素。如果本不相同的元素被识别为相同,则会出现[意料之外的副作用](https://jsfiddle.net/chrisvfritz/bh8fLeds/)
15411541

15421542
{% raw %}<div class="style-example example-bad">{% endraw %}
15431543
#### 反例

0 commit comments

Comments
 (0)