Skip to content

Commit 4db8dbc

Browse files
committed
Merge pull request vuejs#31 from wahaha2012/lang-zh
translate vm.$interpolate and correct homophones in vm.$off api document
2 parents 0c144d1 + 41310ca commit 4db8dbc

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

source/api/instance-methods.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ vm.$eval('msg | uppercase') // -> 'HELLO'
8888

8989
- **templateString** `String`
9090

91-
Evaluate a piece of template string containing mustache interpolations. Note that this method simply performs string interpolation; attribute directives are not compiled.
91+
计算一段包含mustache数据的模板字符串。注意:此方法仅仅运行字符串数据;属性指令不会被编译。
9292

9393

9494
``` js
@@ -151,7 +151,7 @@ vm.$log('item') // logs vm.item
151151
- **event** `String` *optional*
152152
- **callback** `Function` *optional*
153153

154-
如果没有传递变量,那么停止监视所有时间;如果传递了一个事件,那么移除该事件的所有回调;如果事件和回调都被传递,则只移除该回调。
154+
如果没有传递变量,那么停止监视所有事件;如果传递了一个事件,那么移除该事件的所有回调;如果事件和回调都被传递,则只移除该回调。
155155

156156
## DOM
157157

source/api/options.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ HTML属性名是不区分大小写的,所以我们用`-`而不是camel case。
159159

160160
一个被插入到`vm.$el`的字符串模板。任何`vm.$el`的内容都会被覆盖,除非模板里有[内容插入点](../guide/components.html#Content_Insertion)。如果**replace**选项是`true`,模板会完全替换`vm.$el`
161161

162-
If it starts with `#` it will be used as a querySelector and use the selected element's innerHTML and the template string. This allows the use of the common `<script type="x-template">` trick to include templates.
162+
如果它以`#`开头将会被当做(DOM)选择器处理,使用被选取元素的`innerHTML`和模板字符串。这样允许使用公共的`<script type="x-template">`方式包含模板。
163163

164164
<p class="tip">Vue.js使用基于DOM的模板体系。编译器走遍所有DOM元素去找指令描述来绑定数据。这就意味着所有的Vue.js模板都是可以转成浏览器可以识别的DOM元素。Vue.js转化字符串模板到DOM fragments,所以他们可以被复制在创建更多Vue实例的时候。如果你想你的模板是有效的HTML,你可以设置指令表达式的前缀是`data-`。</p>
165165

@@ -203,13 +203,13 @@ If it starts with `#` it will be used as a querySelector and use the selected el
203203

204204
- **类型:** `Function`
205205

206-
`vm.$el`被一个指令或是VM实例方法(例如`$appendTo()`)添加到DOM里的时候调用。直接操作`vm.$el`**不会**出发这个事件
206+
`vm.$el`被一个指令或是VM实例方法(例如`$appendTo()`)添加到DOM里的时候调用。直接操作`vm.$el`**不会**触发这个事件
207207

208208
### detached
209209

210210
- **类型:** `Function`
211211

212-
`vm.$el`被一个指令或是VM实例方法从DOM里删除的时候调用。直接操作`vm.$el`**不会**出发这个事件
212+
`vm.$el`被一个指令或是VM实例方法从DOM里删除的时候调用。直接操作`vm.$el`**不会**触发这个事件
213213

214214
### beforeDestroy
215215

@@ -233,31 +233,31 @@ If it starts with `#` it will be used as a querySelector and use the selected el
233233

234234
- **类型:** `Object`
235235

236-
一个指令的哈希表。更多看[Writing Custom Directives](../guide/custom-directive.html).
236+
一个指令的哈希表。参看[Writing Custom Directives](../guide/custom-directive.html).
237237

238238
### filters
239239

240240
- **类型:** `Object`
241241

242-
一个过滤器的哈希表。更多看[Writing Custom Filters](../guide/custom-filter.html).
242+
一个过滤器的哈希表。参看[Writing Custom Filters](../guide/custom-filter.html).
243243

244244
### components
245245

246246
- **类型:** `Object`
247247

248-
一个组件的哈希表。更多看[Component System](../guide/components.html).
248+
一个组件的哈希表。参看[Component System](../guide/components.html).
249249

250250
### partials
251251

252252
- **类型:** `Object`
253253

254-
一个partial的哈希表。更多看[v-partial](../api/directives.html#v-partial)
254+
一个partial的哈希表。参看[v-partial](../api/directives.html#v-partial)
255255

256256
### transitions
257257

258258
- **类型:** `Object`
259259

260-
一个transition的哈希表。详细看[Transitions](../guide/transitions.html)
260+
一个transition的哈希表。详细查看[Transitions](../guide/transitions.html)
261261

262262
## Others
263263

@@ -269,7 +269,7 @@ If it starts with `#` it will be used as a querySelector and use the selected el
269269
是否继承父组件的数据. 如果你想从父组件继承数据,就设成`true``inherit``true`的时候你可以:
270270

271271
1. 在当先组件模板里绑定父组件的数据属性;
272-
2. 直接访问父组件的属相(通过prototypal继承)。
272+
2. 直接访问父组件的属性(通过prototypal继承)。
273273

274274
重要的是,当用`inherit: true`**子组件也可以改变父组件的属性值**,因为所有Vue实例的数据都是getter/setters。
275275

@@ -366,7 +366,7 @@ var vm = new Vue({
366366
- **类型**: `String`
367367
- **限制:** 仅限使用 `Vue.extend()`的时候。
368368

369-
当在console里监视一个扩展过的Vue组件的时候,缺省构造函数名是`VueComponent`,但它并不是很有用。但你可以传一个可选项`name``Vue.extend()`这样你就能知道你正在看那个组件。这个字符串或被camelized并作为组件的构造函数的名字使用。
369+
当在console里监视一个扩展过的Vue组件的时候,缺省构造函数名是`VueComponent`,但它并不是很有用。但你可以传一个可选项`name``Vue.extend()`这样你就能知道你正在看哪个组件。这个字符串或被camelized并作为组件的构造函数的名字使用。
370370

371371
**例子:**
372372

0 commit comments

Comments
 (0)