Github user Hanks10100 commented on a diff in the pull request:

    https://github.com/apache/incubator-weex-site/pull/46#discussion_r163444366
  
    --- Diff: source/cn/guide/use-vue.md ---
    @@ -5,7 +5,280 @@ group: Overview
     order: 1.6
     version: 2.1
     ---
    +<!-- 
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    + -->
     
    -Working in progress.
    +自2016年2月17日发布WeexSDK 
[v0.10.0](https://github.com/alibaba/weex/releases/tag/v0.10.0)后,Weex集成了v2版本的Vue。Vue(读音
 /vjuː/,类似于 view 的读音)是一套构建用户界面(user 
interface)的渐进式框架。详情请参阅å…
¶[官方网站](https://cn.vuejs.org/)。
     
    -Please refer to the [English version](../../guide/use-vue.html).
    +> 如果没有特别指示, 文章中的"Vue.js"或者
"Vue"都指的是v2版本的Vue。
    +
    +## 只含有运行时的构建版本
    +
    +如果你熟悉Vue.js,你应该知道Vue.js有两种构建版本: 
[**运行时 + 编译器** 与 **只包
含运行时**](https://cn.vuejs.org/v2/guide/installation.html#%E8%BF%90%E8%A1%8C%E6%97%B6-%E7%BC%96%E8%AF%91%E5%99%A8-vs-%E5%8F%AA%E5%8C%85%E5%90%AB%E8%BF%90%E8%A1%8C%E6%97%B6)。它们之间的区别在于编译器是否需要能够在运行时编译`template`选项。由于运行时构建版本比完整版本的构建版本轻约30%,为了更好的性能和更少的代ç
 å°ºå¯¸ï¼ŒWeex用的是只包含运行时的方式构建Vue。
    +
    +具体来说,差异如下:
    +
    ++ 
定义组件时不支持[`template`](https://cn.vuejs.org/v2/api/#template)选项。
    ++ 
不支持使用[`x-templates`](https://cn.vuejs.org/v2/guide/components.html#X-Templates).
    ++ 不支持使用[`Vue.compile`](https://cn.vuejs.org/v2/api/#Vue-compile).
    +
    +## 平台的差异
    +
    
+Vue.js最初是为Web平台设计的。虽然可以基于Weex开发原生应用程序,但是仍然存在许多[Weex
 与 Web 平台的差异](../wiki/platform-difference.html)。
    +
    +与 Web 平台的主要差异是: 上下文、DOM、样式和事件。
    +
    +### 上下文
    
+Weex主要用于编写多页的应用程序,每一页相当于原生开发中的
 *View* 或者 *Activity*,并且它有着自己的上下文。尤å…
¶`Vue`实例在每个页面都是不同的,甚至Vue的"全局"é…
ç½®(`Vue.config.xxx`)也只会影响Weex上的单个页面。
    +
    
+在此基础上,一些Vue的SPA(单页面应用)技术,如[Vuex](https://vuex.vuejs.org/zh-cn/)和[vue-router](https://router.vuejs.org/zh-cn/)也将单页å†
…
生效。更通俗地说,“页面”概念在SPA技术中是虚拟的,但在Weex上却是真实的。
    +
    +无
论如何,Vuex和vue-路由器都是独立的库,它们都有自己的概念和使用场景,ä½
 
仍然可以在Weex里[使用Vuex和vue-router](./advanced/use-vuex-and-vue-router.html)。
    +
    +### DOM
    +
    +因为在Android和iOS上没有DOM(document object mode),如果你
要手动操作和生成DOM元素的话可能会遇到一些å…
¼å®¹æ€§é—®é¢˜ã€‚在你使用现代前端框架的情
况下,操作数据与组件而不是生成的元素
是一个比较好的做法。
    --- End diff --
    
    Document Object Model


---

Reply via email to