Skip to content

Commit 0b091e5

Browse files
committed
0.11.9
1 parent 73e7767 commit 0b091e5

File tree

9 files changed

+464
-276
lines changed

9 files changed

+464
-276
lines changed

source/api/directives.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Example inheriting individual properties (using the same data):
217217
### v-events
218218

219219
- This directive can only be used with `v-component`.
220-
- This directive accepts only keypaths, no expressions.
220+
- This directive accepts either a method name, or a single expression statement.
221221

222222
Allows a parent instance to listen to events on a child instance. The difference from `v-on` is that `v-events` listens to Vue's component system events created via `vm.$emit()` rather than DOM events. This directive allows more decoupled parent-child communication without having to hard-code event listeners into the parent component. Note that it can only be used together with `v-component`, i.e. on the root element of a child component.
223223

@@ -237,21 +237,14 @@ When the child component calls `this.$emit('change', ...)`, the parent's `onChil
237237
### v-component
238238

239239
- Directive params: [`keep-alive`](/guide/components.html#Dynamic_Components), [`wait-for`](/guide/components.html#wait-for), [`transition-mode`](/guide/components.html#transition-mode), [`inline-template`](/guide/components.html#Inline_Template)
240+
- Can be made reactive with mustaches
240241

241242
Compile this element as a child ViewModel with a registered component constructor. This can be used with `v-with` to inehrit data from the parent. For more details see [Component System](/guide/components.html).
242243

243-
### v-ref
244-
245-
Register a reference to a child component on its parent for easier access. Only respected when used in combination with `v-component` or `v-repeat`. The component instance will be accessible on its parent's `$` object. For an example, see [child reference](/guide/components.html#Child_Reference).
246-
247-
When used with `v-repeat`, the value will be an Array containing all the child Vue instances corresponding to the Array they are bound to.
248-
249-
### v-el
250-
251-
Register a reference to a DOM element on its owner Vue instance for easier access. e.g. `<div v-el="hi">` will be accessible as `vm.$$.hi`.
252-
253244
### v-partial
254245

246+
- Can be made reactive with mustaches
247+
255248
Replace the element's innerHTML with a registered partial. Partials can be registered with `Vue.partial()` or passed inside the `partials` option.
256249

257250
Using the mustache tag inside `v-partial` makes it reactive:
@@ -269,10 +262,22 @@ You can also use this syntax (which doesn't support reactivity):
269262

270263
### v-transition
271264

265+
- Can be made reactive with mustaches
266+
272267
Notify Vue.js to apply transitions to this element. The transition classes are applied when certain transition-triggering directives modify the element, or when the Vue instance's DOM manipulation methods are called.
273268

274269
For details, see [the guide on transitions](/guide/transitions.html).
275270

271+
### v-ref
272+
273+
Register a reference to a child component on its parent for easier access. Only respected when used in combination with `v-component` or `v-repeat`. The component instance will be accessible on its parent's `$` object. For an example, see [child reference](/guide/components.html#Child_Reference).
274+
275+
When used with `v-repeat`, the value will be an Array containing all the child Vue instances corresponding to the Array they are bound to.
276+
277+
### v-el
278+
279+
Register a reference to a DOM element on its owner Vue instance for easier access. e.g. `<div v-el="hi">` will be accessible as `vm.$$.hi`.
280+
276281
## Empty Directives
277282

278283
> Empty directives do not require and will ignore their attribute value.

source/guide/directives.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ Some directives don't create data bindings - they simply take the attribute valu
6868

6969
Here `"my-component"` is not a data property - it's a string ID that Vue.js uses to lookup the corresponding Component constructor.
7070

71-
You can also use mustache expressions inside literal directives. For example, the following code allows you to dynamically resolve the type of component you want to use:
71+
You can also use mustache expressions inside literal directives to make it reactive. For example, the following code allows you to dynamically resolve the type of component you want to use:
7272

7373
``` html
7474
<div v-component="{{ isOwner ? 'owner-panel' : 'guest-panel' }}"></div>
7575
```
7676

7777
When the expression inside the mustaches change, the rendered component will also change accordingly!
7878

79-
However, note that `v-component` and `v-partial` are the only literal directives that have this kind of reactive behavior. Mustache expressions in other literal directives, e.g. `v-ref`, are evaluated **only once**. After the directive has been compiled, it will no longer react to value changes.
79+
However, note that not all literal directives can have this kind of reactive behavior. Built-in directives that support this usage include `v-component`, `v-partial` and `v-transition`. Mustache expressions in other literal directives, e.g. `v-ref` and `v-el`, are evaluated **only once**. After the directive has been compiled, it will no longer react to value changes.
8080

8181
A full list of literal directives can be found in the [API reference](/api/directives.html#Literal_Directives).
8282

source/guide/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ order: 15
1515

1616
2. You cannot define your own getter/setters on data objects. This isn't much of a problem because data objects are expected to be obtained from plain JSON and Vue.js provides computed properties.
1717

18-
3. Vue.js adds a few extra properties/methods to obsesrved objects: `__ob__`, `$add` and `$delete`. These properties are inenumberable so they will not show up in `for ... in ...` loops. However if you overwrite them things will likely break.
18+
3. Vue.js adds a few extra properties/methods to obsesrved objects: `__ob__`, `$add`, `$set` and `$delete`. These properties are inenumberable so they will not show up in `for ... in ...` loops. However if you overwrite them things will likely break.
1919

2020
That's pretty much it. Accessing properties on the object is the same as before, `JSON.stringify` and `for ... in ...` loops will work as normal. 99.9% of the time you don't even need to think about it.
2121

source/guide/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Vue instances proxy all properties on data objects they observe. So once an obje
5353

5454
The data objects are mutated in place, so modifying it by reference has the same effects as modifying `vm.$data`. This makes it possible for multiple Vue instances to observe the same piece of data. In larger applications it is also recommended to treat Vue instances as pure views, and externalize the data manipulation logic into a more discrete store layer.
5555

56-
One caveat here is that once the observation has been initiated, Vue.js will not be able to detect newly added or deleted properties. To get around that, observed objects are augmented with `$add` and `$delete` methods.
56+
One caveat here is that once the observation has been initiated, Vue.js will not be able to detect newly added or deleted properties. To get around that, observed objects are augmented with `$add`, `$set` and `$delete` methods.
5757

5858
### Directives
5959

source/guide/installation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
title: Installation
22
type: guide
33
order: 1
4-
vue_version: 0.11.8
5-
dev_size: 189.56
6-
min_size: 58.59
7-
gz_size: 19.20
4+
vue_version: 0.11.9
5+
dev_size: 193.93
6+
min_size: 59.70
7+
gz_size: 19.52
88
---
99

1010
> **Compatibility Note:** Vue.js does not support IE8 and below.

source/guide/list.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ new Vue({
247247
})
248248
</script>
249249

250-
<p class="tip">In ECMAScript 5 there is no way to detect when a new property is added to an Object, or when a property is deleted from an Object. To deal with that, observed objects will be augmented with two methods: `$add(key, value)` and `$delete(key)`. These methods can be used to add / delete properties from observed objects while triggering the desired View updates.</p>
250+
<p class="tip">In ECMAScript 5 there is no way to detect when a new property is added to an Object, or when a property is deleted from an Object. To deal with that, observed objects will be augmented with three methods: `$add(key, value)`, `$set(key, value)` and `$delete(key)`. These methods can be used to add / delete properties from observed objects while triggering the desired View updates. The difference between `$add` and `$set` is that `$add` will return early if the key already exists on the object, so just calling `obj.$add(key)` won't overwrite the existing value with `undefined`.</p>
251251

252252
## Iterating Over a Range
253253

themes/vue/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
google_analytics: UA-46852172-1
22
root_domain: vuejs.org
3-
vue_version: 0.11.8
3+
vue_version: 0.11.9

0 commit comments

Comments
 (0)