Skip to content

Commit ec8d588

Browse files
authored
Merge pull request #94 from vuejs/master
更新官方文档
2 parents b161f94 + 4960c14 commit ec8d588

10 files changed

+13
-13
lines changed

src/guide/comparison.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ Since you don't need to know about JSX, ES2015, or build systems to get started
224224

225225
ReactNative enables you to write native-rendered apps for iOS and Android using the same React component model. This is great in that as a developer, you can apply your knowledge of a framework across multiple platforms. On this front, Vue has an official collaboration with [Weex](https://alibaba.github.io/weex/), a cross-platform UI framework developed by Alibaba Group, which uses Vue as its JavaScript framework runtime. This means with Weex, you can use the same Vue component syntax to author components that can not only be rendered in the Browser, but also natively on iOS and Android!
226226

227-
At this moment, Weex is still in active development and is not as mature and battle-tested as ReactNative, but its development is driven by the production needs of the largest e-commmerce business in the world, and the Vue team will also actively collaborate with the Weex team to ensure a smooth experience for Vue developers.
227+
At this moment, Weex is still in active development and is not as mature and battle-tested as ReactNative, but its development is driven by the production needs of the largest e-commerce business in the world, and the Vue team will also actively collaborate with the Weex team to ensure a smooth experience for Vue developers.
228228

229229
### With MobX
230230

@@ -316,7 +316,7 @@ Polymer custom elements are authored in HTML files, which limits you to plain Ja
316316

317317
When deploying to production, Polymer recommends loading everything on-the-fly with HTML Imports, which assumes browsers implementing the spec, and HTTP/2 support on both server and client. This may or may not be feasible depending on your target audience and deployment environment. In cases where this is not desirable, you will have to use a special tool called Vulcanizer to bundle your Polymer elements. On this front, Vue can combine its async component feature with Webpack's code-splitting feature to easily split out parts of the application bundle to be lazy-loaded. This ensures compatibility with older browsers while retaining great app loading performance.
318318

319-
It is also totally feasible to offer deeper integration between Vue with Web Component specs such as Custom Elements and Shadow DOM style encapsulation - however at this moment we are still waiting for the specs to mature and be widely implemented in all mainstream browsers before making any serious committments.
319+
It is also totally feasible to offer deeper integration between Vue with Web Component specs such as Custom Elements and Shadow DOM style encapsulation - however at this moment we are still waiting for the specs to mature and be widely implemented in all mainstream browsers before making any serious commitments.
320320

321321
## Riot
322322

src/guide/forms.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ new Vue({
8585
</script>
8686
{% endraw %}
8787

88-
Mutiple checkboxes, bound to the same Array:
88+
Multiple checkboxes, bound to the same Array:
8989

9090
``` html
9191
<input type="checkbox" id="jack" value="Jack" v-model="checkedNames">

src/guide/list.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ Vue.component('todo-item', {
259259
<li>\
260260
{{ title }}\
261261
<button v-on:click="$emit(\'remove\')">X</button>\
262-
<\li>\
262+
</li>\
263263
',
264264
props: ['title']
265265
})

src/guide/migration-vue-router.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ This option is no longer necessary now that Vue's transition system has explicit
351351

352352
### `suppressTransitionError` <sup>deprecated</sup>
353353

354-
Removed due to hooks simplification. If you really must supress transition errors, you can use [`try`...`catch`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) instead.
354+
Removed due to hooks simplification. If you really must suppress transition errors, you can use [`try`...`catch`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) instead.
355355

356356
{% raw %}
357357
<div class="upgrade-path">
@@ -465,7 +465,7 @@ methods: {
465465
.then(function (response) {
466466
this.posts = response.data.posts
467467
})
468-
.catch(funciton (error) {
468+
.catch(function (error) {
469469
this.fetchError = error
470470
})
471471
}

src/guide/migration.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ Props are now always one-way down. To produce side effects in the parent scope,
290290

291291
- [Custom component events](components.html#Custom-Events)
292292
- [Custom input components](components.html#Form-Input-Components-using-Custom-Events) (using component events)
293-
- [Global state managment](state-management.html)
293+
- [Global state management](state-management.html)
294294

295295
{% raw %}
296296
<div class="upgrade-path">
@@ -305,7 +305,7 @@ Props are now always one-way down. To produce side effects in the parent scope,
305305

306306
- [Custom component events](components.html#Custom-Events)
307307
- [Custom input components](components.html#Form-Input-Components-using-Custom-Events) (using component events)
308-
- [Global state managment](state-management.html)
308+
- [Global state management](state-management.html)
309309

310310
{% raw %}
311311
<div class="upgrade-path">

src/guide/mixins.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ var strategies = Vue.config.optionMergeStrategies
126126
strategies.myOption = strategies.methods
127127
```
128128

129-
A more advanced example can be found on [Vuex](https://github.com/vuejs/vuex)'s merging strategy:
129+
A more advanced example can be found on [Vuex](https://github.com/vuejs/vuex)'s 1.x merging strategy:
130130

131131
``` js
132132
const merge = Vue.config.optionMergeStrategies.computed

src/guide/reactivity.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ There are technical reasons behind this restriction - it eliminates a class of e
7575

7676
## Async Update Queue
7777

78-
In case you haven't noticed yet, Vue performs DOM updates **asynchronously**. Whenever a data change is observed, it will open a queue and buffer all the data changes that happen in the same event loop. If the same watcher is triggered multiple times, it will be pushed into the queue only once. This buffered de-duplication is important in avoiding unnecessary calculations and DOM manipulations. Then, in the next event loop "tick", Vue flushes the queue and performs the actual (already de-duped) work. Internally Vue uses `MutationObserver` if available for the asynchronous queuing and falls back to `setTimeout(fn, 0)`.
78+
In case you haven't noticed yet, Vue performs DOM updates **asynchronously**. Whenever a data change is observed, it will open a queue and buffer all the data changes that happen in the same event loop. If the same watcher is triggered multiple times, it will be pushed into the queue only once. This buffered de-duplication is important in avoiding unnecessary calculations and DOM manipulations. Then, in the next event loop "tick", Vue flushes the queue and performs the actual (already de-duped) work. Internally Vue tries native `Promise.then` and `MutationObserver` for the asynchronous queuing and falls back to `setTimeout(fn, 0)`.
7979

8080
For example, when you set `vm.someData = 'new value'`, the component will not re-render immediately. It will update in the next "tick", when the queue is flushed. Most of the time we don't need to care about this, but it can be tricky when you want to do something that depends on the post-update DOM state. Although Vue.js generally encourages developers to think in a "data-driven" fashion and avoid touching the DOM directly, sometimes it might be necessary to get your hands dirty. In order to wait until Vue.js has finished updating the DOM after a data change, you can use `Vue.nextTick(callback)` immediately after the data is changed. The callback will be called after the DOM has been updated. For example:
8181

src/guide/render-function.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ createElement(
108108
// {String | Array}
109109
// Children VNodes. Optional.
110110
[
111-
createElement('h1', 'hello world')
111+
createElement('h1', 'hello world'),
112112
createElement(MyComponent, {
113113
props: {
114114
someProp: 'foo'

src/guide/state-management.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ var store = {
5151

5252
Notice all actions that mutate the store's state are put inside the store itself. This type of centralized state management makes it easier to understand what type of mutations could happen and how are they triggered. When something goes wrong, we'll also now have a log of what happened leading up to the bug.
5353

54-
In additon, each instance/component can still own and manage its own private state:
54+
In addition, each instance/component can still own and manage its own private state:
5555

5656
``` js
5757
var vmA = new Vue({

src/guide/transitions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1468,7 +1468,7 @@ Vue.component('my-special-transition', {
14681468
<transition\
14691469
name="very-special-transition"\
14701470
mode="out-in"\
1471-
v-on:before-enter="beforEnter"\
1471+
v-on:before-enter="beforeEnter"\
14721472
v-on:after-enter="afterEnter"\
14731473
>\
14741474
<slot></slot>\

0 commit comments

Comments
 (0)