Skip to content

Commit 9ab6f90

Browse files
authored
Added notes about truthy & falsy. (vuejs#521)
1 parent 06870c4 commit 9ab6f90

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/v2/guide/class-and-style.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ HTML 最终将被渲染成为:
140140
<my-component v-bind:class="{ active: isActive }"></my-component>
141141
```
142142

143-
`isActive` 为 truthy 的时候,HTML 将被渲染成为:
143+
`isActive` 为 truthy 值 (译者注:truthy 不是 `true`[参考这里](https://developer.mozilla.org/zh-CN/docs/Glossary/Truthy)) 的时候,HTML 将被渲染成为:
144144

145145
``` html
146146
<p class="foo bar active">Hi</p>

src/v2/guide/syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ mustache 语法不能作用在 HTML 特性上,遇到这种情况应该使用 [
4848
<div v-bind:id="dynamicId"></div>
4949
```
5050

51-
这同样适用于布尔类特性,如果求值结果是 falsy 的值,则该特性将会被删除:
51+
这同样适用于布尔类特性,如果求值结果是 falsy 的值 (译者注:falsy 不是 `false`[参考这里](https://developer.mozilla.org/zh-CN/docs/Glossary/Falsy)),则该特性将会被删除:
5252

5353
``` html
5454
<button v-bind:disabled="isButtonDisabled">Button</button>

0 commit comments

Comments
 (0)