Skip to content

Commit d196b9d

Browse files
phananJustineo
authored andcommitted
Remove Handlebars reference (fixes 1780) (#1972)
* Remove Handlebars ref (fixes 1780) * Fix wrong use of vice versa oh my English sucks
1 parent 0fe951c commit d196b9d

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/v2/guide/conditional.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,17 @@ order: 7
66

77
## `v-if`
88

9-
在字符串模板中,比如 [Handlebars](https://handlebarsjs.com/),我们得像这样写一个条件块:
9+
`v-if` 指令用于条件性地渲染一块内容。这块内容只会在指令的表达式返回 truthy 值的时候被渲染。
1010

1111
``` html
12-
<!-- Handlebars 模板 -->
13-
{{#if ok}}
14-
<h1>Yes</h1>
15-
{{/if}}
16-
```
17-
18-
在 Vue 中,我们使用 `v-if` 指令实现同样的功能:
19-
20-
``` html
21-
<h1 v-if="ok">Yes</h1>
12+
<h1 v-if="awesome">Vue is awesome!</h1>
2213
```
2314

2415
也可以用 `v-else` 添加一个“else 块”:
2516

2617
``` html
27-
<h1 v-if="ok">Yes</h1>
28-
<h1 v-else>No</h1>
18+
<h1 v-if="awesome">Vue is awesome!</h1>
19+
<h1 v-else>Oh no 😢</h1>
2920
```
3021

3122
### `<template>` 元素上使用 `v-if` 条件渲染分组

0 commit comments

Comments
 (0)