You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by mo...@apache.org on 2018/12/23 12:37:25 UTC

[incubator-weex-site] branch draft updated: update and fix cell document.

This is an automated email from the ASF dual-hosted git repository.

moshen pushed a commit to branch draft
in repository https://gitbox.apache.org/repos/asf/incubator-weex-site.git


The following commit(s) were added to refs/heads/draft by this push:
     new ca4d139  update and fix cell document.
ca4d139 is described below

commit ca4d139783e2b09f02e5f4a36c5650a4d1c06c04
Author: wqyfavor <qi...@taobao.com>
AuthorDate: Sun Dec 23 20:37:15 2018 +0800

    update and fix cell document.
---
 docs/docs/components/a.md           |  5 ++-
 docs/docs/components/cell.md        | 37 ++++++++++-----------
 docs/guide/extend/extend-android.md |  2 +-
 docs/zh/docs/components/a.md        |  6 ++--
 docs/zh/docs/components/cell.md     | 64 ++++++++++++++++++-------------------
 5 files changed, 53 insertions(+), 61 deletions(-)

diff --git a/docs/docs/components/a.md b/docs/docs/components/a.md
index 70dd550..6e4d40f 100644
--- a/docs/docs/components/a.md
+++ b/docs/docs/components/a.md
@@ -1,4 +1,4 @@
-## Introduction
+## Summary
 
 `<a>` is mainly used for navigation between weex pages。
 
@@ -15,8 +15,7 @@ Wrap the element navigating from with `<a>`
 
 Refer the [demo](http://dotwe.org/vue/1cec564d6e25c169a0a9a92db3a00955).
 
-## Attributes:
-
+## Attributes
 
 * **href** String ,`href` defines the URL that current page will navigate. `href` **must** point to a weex page, the behavior of other case is **undefined**.
 
diff --git a/docs/docs/components/cell.md b/docs/docs/components/cell.md
index c8575eb..2c3d991 100644
--- a/docs/docs/components/cell.md
+++ b/docs/docs/components/cell.md
@@ -1,37 +1,34 @@
-# &lt;cell&gt;
+## Summary
 
-### Summary
+This component must be used as a subcomponent of a [`list`](./list.html) [`recycler`](./list.html) [`waterfall`](./waterfall.html) component.
 
-This component must be used as a subcomponent of a [`list`](./list.html) [`recycler`](./list.html) [`waterfall`](./waterfall.html) component, which is for the performance optimizing for long list scrolling.
-
-### Child Components
+## Child Components
 
 This type of component supports all kinds of weex component as its child components.
 
-### Attributes
+## Attributes
 
-**Notes:** you can't give `<cell>` a `flex` value. Width of `<cell>` is equal to the width of its parent component `<list>`, and you don't need to specify its height.
+**Notes:** You can't give `<cell>` a `flex` value. Width of `<cell>` is equal to the width of its parent list/recycler/waterfall component, and you don't need to specify its height.
 
-* `keep-scroll-position {boolean}`: <span class="api-version">v0.11+</span> List Whether to keep the last sliding position after inserting the Cell
+* **keep-scroll-position** boolean, <span class="api-version">v0.11+</span>. It controls whether to keep the last sliding position after inserting the cell.
 
-### Styles
+* **insert-animation** string, cell insert animation. Only support `none` and `default` now.
+* **delete-animation** string, cell delete animation. Only support `none` and `default` now.
 
-**common styles**: check out the [common styles](/wiki/common-styles.html)
+* **recycle** boolean, <span class="api-version">iOS</span>, default true. It controls whether the cell's view in a list should be recycled when the UITableView is scrolling. You should always use true for iOS.
 
-- support flexbox related styles
-- support box model related styles
-- support ``position`` related styles
-- support ``opacity``, ``background-color`` etc.
+### Styles
 
-**Notes:** cell itself is a container, its layout info is managed by list, so specifying cell's margin info will not work.
+* **common styles**. Check out [common styles](/wiki/common-styles.html).
 
-### Events
+**Notes:** Cell itself is a container and its layout info is managed by parent component such as list. So `margin` should not be specified for a cell.
 
-**common events**: check out the [common events](/wiki/common-events.html)
+### Events
 
-- support `click` event. Check out [common events](/wiki/common-events.html)
-- support `appear` / `disappear` event. Check out [common events](/wiki/common-events.html)
+* **common events**. Check out [common events](/wiki/common-events.html).
 
 ### Example
 
-please refer to [List](./list.html) [`recycler`](./list.html) [`waterfall`](./waterfall.html)
+Please refer to
+* [list](./list.html)
+* [waterfall](./waterfall.html)
diff --git a/docs/guide/extend/extend-android.md b/docs/guide/extend/extend-android.md
index 1bfe0a9..e05cf4e 100644
--- a/docs/guide/extend/extend-android.md
+++ b/docs/guide/extend/extend-android.md
@@ -10,7 +10,7 @@ version: 2.1
 
 Weex supports module-extend、component-extend and adapter-extend.
 
-## Module extend
+## Extend module
 
 1. Customize modules class must extend from WXModule.
 2. Extended method must add @JSMethod (uiThread = false or true) annotation, which determines whether the method is run on UI thread.
diff --git a/docs/zh/docs/components/a.md b/docs/zh/docs/components/a.md
index 8db92bb..4ad79e3 100644
--- a/docs/zh/docs/components/a.md
+++ b/docs/zh/docs/components/a.md
@@ -1,4 +1,4 @@
-# 简介 
+## 简介
 
 &lt;a&gt; 组件用于实现页面间的跳转。
 
@@ -6,7 +6,6 @@
 
 * **href** string. 待跳转的页面 URL,待跳转页面需要是一个 Weex 页面。如果待跳转页面是一个普通 HTML,这会是一个未定义行为
 
-
 ## 样式
 
 * **通用样式**. 参见[通用样式](../styles/common-styles.html).
@@ -23,8 +22,7 @@
 
 ## 示例
 
-
-```
+```Html
 <a href="http://emas-ha-remote-log-poc.oss-cn-beijing.aliyuncs.com/eweex/app/biz-docs-com-mod/upload/271ccdca-db41-423d-981c-c7c6751ba479/show_1.js">
   <text>主会场</text>
 </a> 
diff --git a/docs/zh/docs/components/cell.md b/docs/zh/docs/components/cell.md
index d68fd1a..fa46a4b 100644
--- a/docs/zh/docs/components/cell.md
+++ b/docs/zh/docs/components/cell.md
@@ -1,36 +1,34 @@
----
-sidebarDepth: 0
----
-# &lt;cell&gt;
-用于定义列表中的子列表项,类似于 HTML 中的 `ul` 之于 `li`。Weex 会对 `<cell>` 进行高效的内存回收以达到更好的性能,该组件必须作为`<list>`、`<waterfall>`组件的子组件, 这是为了优化滚动时的性能。
-
-```vue{3}
-<template>
-  <list>
-    <cell v-for="num in lists">
-      <text>{{num}}</text>
-    </cell>
-  </list>
-</template>
-
-<script>
-  export default {
-    data () {
-      return {
-        lists: ['A', 'B', 'C', 'D', 'E']
-      }
-    }
-  }
-</script>
-```
-
-::: warning 注意
-* 由于 `<cell>` 本身是一个容器,其布局由 `<list>` 进行管理,你不能给 `<cell>` 设定 flex 值。
-* `<cell>` 的宽度等于父组件 `<list>` 的宽度,并且 `<cell>` 高度自适应,指定 margin 样式也不起作用。
-:::
+## 简介
+
+Cell 必须以一级子组件的形式存在于 [`list`](./list.html) [`recycler`](./list.html) [`waterfall`](./waterfall.html) 中。
 
 ## 子组件
-支持所有 Weex 的组件作为它的子组件。
 
-## Demo
-[基本用法](http://dotwe.org/vue/3c649d5bb5b8ec434fbdce5c16c357c9)
\ No newline at end of file
+Cell 支持添加任意类型的组件作为自己的子组件。
+
+## 属性
+
+**注意:** 不要指定 `<cell>` 的 `flex` 值。Cell 的宽度是由它的父容器决定的,你也不需要指定它的高度。
+
+* **keep-scroll-position** boolean, <span class="api-version">v0.11+</span>. 控制当 Cell 被添加到列表中时,列表的滚动位置是否要保持不变。
+
+* **insert-animation** string, cell 的插入动画。当前只支持 `none` 和 `default`。
+* **delete-animation** string, cell 的删除动画。当前只支持 `none` 和 `default`。
+
+* **recycle** boolean, <span class="api-version">iOS</span>, 默认值 true。这个属性控制这个 Cell 的 view 和子 views 是否在列表滚动时进行回收,在 iOS 上通常必须指定为 true (因为默认为 true,所以一般不需要写这个属性),如果设置为 false,列表滚动时,页面会占用非常高的内存。
+
+## 样式
+
+* **通用样式** 支持所有[通用样式](/cn/wiki/common-styles.html)。
+
+**Notes:** Cell 的排版的位置是由父容器控制的,所以一般不要为其指定 `margin` 样式。
+
+## 事件
+
+* **通用事件** 支持所有[通用事件](/cn/wiki/common-events.html)。
+
+### Example
+
+Cell 的例子请参考
+* [list](./list.html)
+* [waterfall](./waterfall.html)