diff --git a/src/tutorial/src/step-3/App/template.html b/src/tutorial/src/step-3/App/template.html index 4d629646..cbf82571 100644 --- a/src/tutorial/src/step-3/App/template.html +++ b/src/tutorial/src/step-3/App/template.html @@ -1 +1 @@ -

Make me red

+

Make me red

diff --git a/src/tutorial/src/step-3/description.md b/src/tutorial/src/step-3/description.md index bc92322e..d5630147 100644 --- a/src/tutorial/src/step-3/description.md +++ b/src/tutorial/src/step-3/description.md @@ -1,19 +1,19 @@ -# Attribute 绑定 {#attribute-bindings} +# 屬性綁定 {#attribute-bindings} -在 Vue 中,mustache 语法 (即双大括号) 只能用于文本插值。为了给 attribute 绑定一个动态值,需要使用 `v-bind` 指令: +在 Vue 中,mustache 語法 (即雙大括號) 只能用於文本插值。為了給屬性綁定一個動態值,需要使用 `v-bind` 指令: ```vue-html
``` -**指令**是由 `v-` 开头的一种特殊 attribute。它们是 Vue 模板语法的一部分。和文本插值类似,指令的值是可以访问组件状态的 JavaScript 表达式。关于 `v-bind` 和指令语法的完整细节请详阅指南 - 模板语法。 +**指令**是由 `v-` 開頭的一種特殊屬性。它們是 Vue 模板語法的一部分。和文本插值類似,指令的值是可以訪問組件狀態的 JavaScript 表達式。關於 `v-bind` 和指令語法的完整細節請詳閱指南 - 模板語法。 -冒号后面的部分 (`:id`) 是指令的“参数”。此处,元素的 `id` attribute 将与组件状态里的 `dynamicId` 属性保持同步。 +冒號後面的部分 (`:id`) 是指令的“參數”。此處,元素的 `id` attribute 將與組件狀態裡的 `dynamicId` 屬性保持同步。 -由于 `v-bind` 使用地非常频繁,它有一个专门的简写语法: +由於 `v-bind` 使用地非常頻繁,它有一個專門的簡寫語法: ```vue-html
``` -现在,试着把一个动态的 `class` 绑定添加到这个 `

` 上,并使用 `titleClass` 的数据属性 ref 作为它的值。如果绑定正确,文字将会变为红色。 +現在,試著把一個動態的 `class` 綁定添加到這個 `

` 上,並使用 `titleClass` 的數據屬性 ref 作為它的值。如果綁定正確,文字將會變為紅色。