Repository: incubator-weex-site
Updated Branches:
  refs/heads/master d71d8e589 -> b8af79e79


[WEEX-86][doc] update vuex and vue-router document


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-weex-site/commit/f42e30d8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/tree/f42e30d8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/diff/f42e30d8

Branch: refs/heads/master
Commit: f42e30d80cfb4b29d88cece64c63f148660faf26
Parents: b8ee5b9
Author: Hanks <[email protected]>
Authored: Tue Nov 28 20:18:59 2017 +0800
Committer: Hanks <[email protected]>
Committed: Tue Nov 28 20:18:59 2017 +0800

----------------------------------------------------------------------
 .../cn/guide/advanced/use-vuex-and-vue-router.md  |  6 ++----
 source/guide/advanced/use-vuex-and-vue-router.md  | 18 ++++++++----------
 2 files changed, 10 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/f42e30d8/source/cn/guide/advanced/use-vuex-and-vue-router.md
----------------------------------------------------------------------
diff --git a/source/cn/guide/advanced/use-vuex-and-vue-router.md 
b/source/cn/guide/advanced/use-vuex-and-vue-router.md
index 844f8fb..ac3ce8e 100644
--- a/source/cn/guide/advanced/use-vuex-and-vue-router.md
+++ b/source/cn/guide/advanced/use-vuex-and-vue-router.md
@@ -10,7 +10,7 @@ version: 2.1
 
 Vue.js 也有较多周边技术产品,如 
[Vuex](https://github.com/vuejs/vuex) 和 
[vue-router](https://github.com/vuejs/vue-router) 等,这些库也可以在 
Weex 中很好的工作。
 
-> 我们基于 Weex 和 Vue 开发了一个的完整项目 
[weex-hackernews](https://github.com/weexteam/weex-hackernews) 
,在项目中使用了 Vuex 和 vue-router ,能够实现同一份代ç 
ï¼Œåœ¨ iOS、Android、Web 下都能完整地工作。
+> **注意**: Weex 使用原生的 navigator 
来管理页面实例,多个实例之间的状态是隔离的。也就是说,Vuex
 和 vue-router 只能作用于当前一个页面,无法在多个页面间å…
±äº«çŠ¶æ€ã€‚
 
 ## 使用 Vuex
 
@@ -18,9 +18,7 @@ Vue.js 也有较多周边技术产品,如 
[Vuex](https://github.com/vuejs/vuex
 
 Vuex 是一个专为 Vue.js 应用程序开发的状态管理工å…
·åº“,可以利用 Vue.js 
的细粒度数据响应机制来进行高效的状态更新。它采用集中式存储管理应用的所有组件的状态,并以相应的规则保证状态以一种可预测的方式发生变化。
 
-由于在 Vuex 本身就是平台无关的,有较强的移植能力,完å…
¨å¯ä»¥åœ¨ Weex 中正常地使用 Vuex ,阅读å…
¶[官方文档](https://vuex.vuejs.org/zh-cn/)可以了解详细的使用方法。
-
-Vuex 也集成到了其官方调试工具 [devtools 
extension](https://github.com/vuejs/vue-devtools)中,提供了诸如 
time-travel 调试、状态快照导入导出等高级调试功能。这些工å…
·åœ¨ Web 平台中可以一如既往地工作。
+由于在 Vuex 本身就是平台无关的,有较强的移植能力,完å…
¨å¯ä»¥åœ¨ Weex 中正常地使用 Vuex。 Vuex 也集成到了å…
¶å®˜æ–¹è°ƒè¯•工具 [devtools 
extension](https://github.com/vuejs/vue-devtools)中,提供了诸如 
time-travel 调试、状态快照导入导出等高级调试功能。这些工å…
·åœ¨ Web 平台中可以一如既往地工作。
 
 ## 使用 vue-router
 

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/f42e30d8/source/guide/advanced/use-vuex-and-vue-router.md
----------------------------------------------------------------------
diff --git a/source/guide/advanced/use-vuex-and-vue-router.md 
b/source/guide/advanced/use-vuex-and-vue-router.md
index 037f1bb..0851e18 100644
--- a/source/guide/advanced/use-vuex-and-vue-router.md
+++ b/source/guide/advanced/use-vuex-and-vue-router.md
@@ -8,9 +8,9 @@ version: 2.1
 
 # Using Vuex and vue-router
 
-Vue.js also has many peripheral technology products such as 
[Vuex](https://github.com/vuejs/vuex) and 
[vue-router](https://github.com/vuejs/vue-router), etc. Those libraries can 
also works well in Weex.
+Vue.js has many peripheral technology products such as 
[Vuex](https://github.com/vuejs/vuex) and 
[vue-router](https://github.com/vuejs/vue-router), those libraries can also 
work well on Weex.
 
-> We developed a complete project based on Weex and Vue.js which named 
[weex-hackernews](https://github.com/weepteam/web-ehackernews). We used Vuex 
and vue-loader in it, and it works well on both iOS, Android and web.
+> **NOTE**: Weex is using native navigator to manage instance pages, the 
context of them are isolated. That means, Both Vuex and vue-router can only 
effect the single page, they can't share state between different pages.
 
 ## Using Vuex
 
@@ -18,11 +18,9 @@ Vue.js also has many peripheral technology products such as 
[Vuex](https://githu
 
 ![Vuex](//vuex.vuejs.org/en/images/vuex.png)
 
-Vuex is a state management pattern + library for Vue.js applications. it's 
also a library implementation tailored specifically for Vue.js to take 
advantage of its granular reactivity system for efficient updates. It serves as 
a centralized store for all the components in an application, with rules 
ensuring that the state can only be mutated in a predictable fashion.
+Vuex is a state management pattern + library for Vue.js applications. It's 
also a library implementation tailored specifically for Vue.js to take 
advantage of its granular reactivity system for efficient updates. It serves as 
a centralized store for all the components in an application, with rules 
ensuring that the state can only be mutated in a predictable fashion.
 
-As a kind of state management library, Vuex is platform-independent, It also 
can be used in Weex. Read its [official documents](https://vuex.vuejs.org/en/) 
for more details.
-
-It also integrates with Vue's official [devtools 
extension](https://github.com/vuejs/vue-devtools) to provide advanced features 
on web platform, such as zero-config time-travel debugging and state snapshot 
export / import. (web platform only)
+As a kind of state management library, Vuex is platform-independent, It also 
can be used in Weex. It also integrates with Vue's official [devtools 
extension](https://github.com/vuejs/vue-devtools) to provide advanced features 
on web platform, such as zero-config time-travel debugging and state snapshot 
export / import. (web platform only)
 
 ## Using vue-router
 
@@ -30,7 +28,7 @@ It also integrates with Vue's official [devtools 
extension](https://github.com/v
 
 Creating a Single-page Application with Vue.js + vue-router is dead simple. 
With Vue.js, you are already composing our application with components. When 
adding vue-router to the mix, all you need to do is map your components to the 
routes and let vue-router know where to render them.
 
-However, there are many difference between web and Android or iOS, some 
features of vue-router are limited in Weex.
+However, there are many differences between web and Android or iOS, some 
features of vue-router are limited in Weex.
 
 ### Router mode
 
@@ -49,13 +47,13 @@ new Router({
 })
 ```
 
-Obviously "hash" mode and "history" mode are only available on the web, and 
have no effect in Weex. That is, you have to use "abstract" mode in Android and 
iOS. However, **vue-router will automatically be forced into "abstract" mode if 
no browser API is present.** so, just don't set the `mode` option, or set it to 
"abstract".
+Obviously, `hash` mode and `history` mode are only available on the web, and 
have no effect in Weex. In other words, you can only use `abstract` mode in 
Android and iOS. However, vue-router will automatically be forced into 
`abstract` mode if no browser API is present. So, just **don't set the `mode` 
option, or set it to `abstract`**.
 
 ### Programmatic navigation
 
-vue-router use `<router-link>` to create a navigation link, but in which some 
of the features based on the DOM events, it doesn't work well in the native 
environment. In Weex, you must use the [Programmatic 
Navigation](https://router.vuejs.org/en/essentials/navigation.html) to manage 
the router.
+vue-router use `<router-link>` to create a navigation link, but in which, some 
features are based on the DOM events and it doesn't work well in the native 
environment. In Weex, you must use the [Programmatic 
Navigation](https://router.vuejs.org/en/essentials/navigation.html) to manage 
the router.
 
-Here is an basic example using `<router-link>`:
+Here is a basic example using `<router-link>`:
 
 ```html
 <!-- Can only be used on the web, it takes no effects on Android or iOS! -->

Reply via email to