You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by cx...@apache.org on 2017/03/16 08:59:32 UTC

[37/50] incubator-weex git commit: * [doc] Add doc for scroller, which exists in https://github.com/alibaba/weex/blob/doc/doc/components/scroller.md#attributes , and disappears for a reason that no one knows.

* [doc] Add doc for scroller, which exists in https://github.com/alibaba/weex/blob/doc/doc/components/scroller.md#attributes , and disappears for a reason that no one knows.


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

Branch: refs/heads/master
Commit: 6dc87a74fabb014f08e2e7dccd501bbf51e5e4d1
Parents: 18aa8f0
Author: YorkShen <sh...@gmail.com>
Authored: Thu Mar 2 17:00:44 2017 +0800
Committer: YorkShen <sh...@gmail.com>
Committed: Thu Mar 2 17:00:44 2017 +0800

----------------------------------------------------------------------
 doc/source/cn/references/components/scroller.md | 4 ++++
 doc/source/references/components/scroller.md    | 4 ++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/6dc87a74/doc/source/cn/references/components/scroller.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/references/components/scroller.md b/doc/source/cn/references/components/scroller.md
index 4bb9f4b..694ce87 100644
--- a/doc/source/cn/references/components/scroller.md
+++ b/doc/source/cn/references/components/scroller.md
@@ -33,6 +33,10 @@ version: 2.1
 
 - `show-scrollbar {boolean}`\uff1a\u53ef\u9009\u503c\u4e3a `true`/ `false`\uff0c\u9ed8\u8ba4\u503c\u4e3a `true`\u3002\u63a7\u5236\u662f\u5426\u51fa\u73b0\u6eda\u52a8\u6761\u3002
 - `scroll-direction {string}`\uff1a\u53ef\u9009\u4e3a `horizontal` \u6216\u8005 `vertical`\uff0c\u9ed8\u8ba4\u503c\u4e3a `vertical` \u3002\u5b9a\u4e49\u6eda\u52a8\u7684\u65b9\u5411\u3002
+  - `scroll-direction`\u5b9a\u4e49\u4e86scroller\u7684\u6eda\u52a8\u65b9\u5411\uff0c`flex-direction`\u5b9a\u4e49\u4e86scroller\u7684\u5e03\u5c40\u65b9\u5411\uff0c\u4e24\u4e2a\u65b9\u5411\u5fc5\u987b\u4e00\u81f4\u3002
+  - `scroll-direction`\u7684\u9ed8\u8ba4\u503c\u662f`vertical`,`flex-direction`\u7684\u9ed8\u8ba4\u503c\u662f`row`\u3002
+  - \u5f53\u9700\u8981\u4e00\u4e2a\u6c34\u5e73\u65b9\u5411\u7684scroller\u65f6\uff0c\u4f7f\u7528`scroll-direction:horizontal`\u548c`flex-direction: row`\u3002
+  - \u5f53\u9700\u8981\u4e00\u4e2a\u7ad6\u76f4\u65b9\u5411\u7684scroller\u65f6\uff0c\u4f7f\u7528`scroll-direction:vertical`\u548c`flex-direction: column`\u3002\u7531\u4e8e\u8fd9\u4e24\u4e2a\u503c\u5747\u662f\u9ed8\u8ba4\u503c\uff0c\u5f53\u9700\u8981\u4e00\u4e2a\u7ad6\u76f4\u65b9\u5411\u7684scroller\u65f6\uff0c\u8fd9\u4e24\u4e2a\u503c\u53ef\u4ee5\u4e0d\u8bbe\u7f6e\u3002
 - `loadmoreoffset {number}`\uff1a\u9ed8\u8ba4\u503c\u4e3a 0\uff0c\u89e6\u53d1 `loadmore` \u4e8b\u4ef6\u6240\u9700\u8981\u7684\u5782\u76f4\u504f\u79fb\u8ddd\u79bb\uff08\u8bbe\u5907\u5c4f\u5e55\u5e95\u90e8\u4e0e\u9875\u9762\u5e95\u90e8\u4e4b\u95f4\u7684\u8ddd\u79bb\uff09\u3002\u5f53\u9875\u9762\u7684\u6eda\u52a8\u6761\u6eda\u52a8\u5230\u8db3\u591f\u63a5\u8fd1\u9875\u9762\u5e95\u90e8\u65f6\u5c06\u4f1a\u89e6\u53d1 `loadmore` \u8fd9\u4e2a\u4e8b\u4ef6\u3002
 
   ![mobile_preview](../images/scroller_1.jpg)

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/6dc87a74/doc/source/references/components/scroller.md
----------------------------------------------------------------------
diff --git a/doc/source/references/components/scroller.md b/doc/source/references/components/scroller.md
index 1b65907..2f637d0 100644
--- a/doc/source/references/components/scroller.md
+++ b/doc/source/references/components/scroller.md
@@ -27,6 +27,10 @@ And there are two special components that can only be used inside scroller compo
 
 * show-scrollbar: true/false whether show the scroll bar or not, default value is true
 * scroll-direction: <string> define scroll direction of component, horizontal or vertical
+  * `scroll-direction` defines the scrollable axis of scroller and `flex-direction` defines the layout axis of scroller. `scroll-direction` and `flex-direction` must be set to the same direction, otherwise, undefined behavior may happen.
+  * Default value for `scroll-direction` is vertical, and for `flex-direction` is row .
+  * Use `scroll-direction:horizontal` and `flex-direction: row` when a horizontal layout and scrollable scroller is expected.
+  * Use `scroll-direction:vertical` and `flex-direction: column` when a vertical layout and scrollable scroller is expected. But thoes two values are default, if you don't set them, it also works fine.
 * loadmoreoffset : <number> default value is 0. The loadmore event will be triggered when the list is loadmoreoffset left to reach the bottom of the list view. e.g. a list has total content length of 1000, and the loadmoreoffset is set to 400, the loadmore event will be triggered when 600 has beed scrolled and there is less than 400 left.
 * loadmoreretry : <number> default value 0\uff0cwhether to reset loadmore related UI when loadmore failed, will be deprecated in further release.