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

    https://github.com/apache/incubator-weex-site/pull/46#discussion_r163444462
  
    --- 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元素的话可能会遇到一些å…
¼å®¹æ€§é—®é¢˜ã€‚在你使用现代前端框架的情
况下,操作数据与组件而不是生成的元素
是一个比较好的做法。
    +
    +一些与dom相关的特性,比如`v-html`, `vm.$el`, 
`template`选项,在不同的平台上可能无法获得相同的反应。
    +
    
+准确来说,[`vm.$el`](https://cn.vuejs.org/v2/api/#vm-el)属性类型在web环境下是
 `HTMLElement`,但是在移动端并没有这个类型。实际
上,它是一个由 *Weex文档对象模型* 定义的特殊数据结构。
    +
    +### 样式
    +
    +样式表和CSS规则是由Weex 
js框架和原生渲染引擎管理的。要实现完整的CSS对象模型(CSSOM:CSS
 Object 
Model)并支持所有的CSS规则是非常困难的,而且没有这个必
要。
    +
    
+出现性能考虑,**Weex目前只支持单个类选择器,并且只支持CSS规则的子集**。详æƒ
…请参阅 *[通用样式](../wiki/common-styles.html)* 与 *[文本æ 
·å¼](../wiki/text-styles.html)*。
    +
    +在Weex里, 每一个Vue组件的样式都是 
*[scoped](https://vue-loader.vuejs.org/zh-cn/features/scoped-css.html)*。
    +
    +### 事件
    +
    +目前在Weex里不支持事件冒泡和捕获,因
此Weex原生组件不支持[事件修饰符](https://cn.vuejs.org/v2/guide/events.html#%E4%BA%8B%E4%BB%B6%E4%BF%AE%E9%A5%B0%E7%AC%A6),例如`.prevent`,
 ` .capture`, `.stop`, ` .self` 。
    +
    
+此外,[按键修饰符](https://cn.vuejs.org/v2/guide/events.html#%E6%8C%89%E9%94%AE%E4%BF%AE%E9%A5%B0%E7%AC%A6)以及[系统修饰键](https://cn.vuejs.org/v2/guide/events.html#%E7%B3%BB%E7%BB%9F%E4%BF%AE%E9%A5%B0%E9%94%AE)
 例如 `.enter`, `.tab`, `.ctrl`, `.shift` 
在移动端基本没有意义,在Weex中也不支持。
    +
    +## Web渲染器
    +
    +如果你想在网络上呈现你的页面,你
需要[weex-vue-render](https://github.com/weexteam/weex-vue-render)来实现它。
    +
    +`weex-vue-render`是Vue DSL的web渲染器, 它在web上实现了Weex的内
置组件和内置模块。详情请参阅
[这](https://github.com/weexteam/weex-vue-render)。
    --- End diff --
    
    请参阅这里


---

Reply via email to