You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/04/17 04:14:33 UTC

[18/48] incubator-weex git commit: + [doc] add english doc

+ [doc] add english doc


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

Branch: refs/heads/0.12-dev
Commit: a04dd259a55b70fba372673482068dcb154bd65b
Parents: 7a09120
Author: \u9f50\u5c71 <su...@163.com>
Authored: Thu Mar 30 10:10:35 2017 +0800
Committer: \u9f50\u5c71 <su...@163.com>
Committed: Thu Mar 30 10:10:35 2017 +0800

----------------------------------------------------------------------
 doc/source/cn/references/components/input.md |  6 +-
 doc/source/references/common-style.md        | 71 ++++++++++++++++++++---
 doc/source/references/components/input.md    | 23 +++++++-
 doc/source/references/modules/dom.md         |  3 +-
 4 files changed, 87 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a04dd259/doc/source/cn/references/components/input.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/references/components/input.md b/doc/source/cn/references/components/input.md
index 546960c..a949ada 100644
--- a/doc/source/cn/references/components/input.md
+++ b/doc/source/cn/references/components/input.md
@@ -25,7 +25,7 @@ Weex \u5185\u7f6e\u7684 `<input>` \u7ec4\u4ef6\u7528\u6765\u521b\u5efa\u63a5\u6536\u7528\u6237\u8f93\u5165\u5b57\u7b26\u7684\u8f93\u5165\u7ec4
 - `disabled {boolean}`\uff1a\u5e03\u5c14\u7c7b\u578b\u7684\u6570\u636e\uff0c\u8868\u793a\u662f\u5426\u652f\u6301\u8f93\u5165\u3002\u901a\u5e38 `click` \u4e8b\u4ef6\u5728 `disabled` \u63a7\u4ef6\u4e0a\u662f\u5931\u6548\u7684\u3002
 - `autofocus {boolean}`\uff1a\u5e03\u5c14\u7c7b\u578b\u7684\u6570\u636e\uff0c\u8868\u793a\u662f\u5426\u5728\u9875\u9762\u52a0\u8f7d\u65f6\u63a7\u4ef6\u81ea\u52a8\u83b7\u5f97\u8f93\u5165\u7126\u70b9\u3002
 - `maxlength {nubmer}`\uff1a<sup class="wx-v">v0.7</sup>\u4e00\u4e2a\u6570\u503c\u7c7b\u578b\u7684\u503c\uff0c\u8868\u793a\u8f93\u5165\u7684\u6700\u5927\u957f\u5ea6\u3002
-- `return-key-type {string}`\uff1a<sup class="wx-v">v0.11</sup>\u952e\u76d8enter\u952e\u7684\u7c7b\u578b\u3002
+- `return-key-type {string}`\uff1a<sup class="wx-v">v0.11</sup>\u952e\u76d8\u8fd4\u56de\u952e\u7684\u7c7b\u578b\u3002
 
 ## \u6837\u5f0f
 
@@ -85,11 +85,11 @@ Weex \u5185\u7f6e\u7684 `<input>` \u7ec4\u4ef6\u7528\u6765\u521b\u5efa\u63a5\u6536\u7528\u6237\u8f93\u5165\u5b57\u7b26\u7684\u8f93\u5165\u7ec4
   \u4e8b\u4ef6\u4e2d event \u5bf9\u8c61\u5c5e\u6027\uff1a
 
   - `timestamp`: \u4e8b\u4ef6\u53d1\u751f\u65f6\u7684\u65f6\u95f4\u6233\u3002
-- `return`: \u952e\u76d8\u70b9\u51fb\u786e\u8ba4\u6309\u94ae\u3002
+- `return`: \u952e\u76d8\u70b9\u51fb\u8fd4\u56de\u952e\u3002
 
     \u4e8b\u4ef6\u4e2d event \u5bf9\u8c61\u5c5e\u6027\uff1a
 
-    - `returnKeyType`: \u4e8b\u4ef6\u53d1\u751f\u65f6\u7684enter\u6309\u94ae\u5185\u7c7b\u578b\u3002
+    - `returnKeyType`: \u4e8b\u4ef6\u53d1\u751f\u65f6\u7684\u8fd4\u56de\u952e\u7c7b\u578b\u3002
     - `value`: \u89e6\u53d1\u4e8b\u4ef6\u7684\u7ec4\u4ef6\u7684\u6587\u672c\uff1b
 
 - \u901a\u7528\u4e8b\u4ef6

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a04dd259/doc/source/references/common-style.md
----------------------------------------------------------------------
diff --git a/doc/source/references/common-style.md b/doc/source/references/common-style.md
index 6cae589..41641c7 100644
--- a/doc/source/references/common-style.md
+++ b/doc/source/references/common-style.md
@@ -213,19 +213,19 @@ All components support `active`, but only the input component and the textarea c
 
 <style scoped>
   .wrapper {
-    align-items: center; 
+    align-items: center;
     margin-top: 120px;
   }
   .title {
     font-size: 48px;
   }
   .logo {
-    width: 360px; 
+    width: 360px;
     height: 82px;
     background-color: red;
   }
   .logo:active {
-    width: 180px; 
+    width: 180px;
     height: 82px;
     background-color: green;
   }
@@ -270,19 +270,19 @@ background-image: linear-gradient(to top,#a80077,#66ff00);
 
 `radial-gradient` is not currently supported, do not use it.
 
-Weex currently supports two color gradients. The direction of the gradient is as follows: 
+Weex currently supports two color gradients. The direction of the gradient is as follows:
 
 * to right
   From left to right
-* to left 
+* to left
   From right to left
-* to bottom 
+* to bottom
   From top to bottom
-* to top 
+* to top
   From bottom to top
-* to bottom right 
+* to bottom right
   From the upper left corner to the lower right corner
-* to top left 
+* to top left
   From the lower right corner to the upper left corner
 
 ### Note
@@ -345,6 +345,59 @@ Weex currently supports two color gradients. The direction of the gradient is as
 </style>
 ```
 
+## box-shadow <span class="api-version">v0.11+</span>
+
+Weex supports box-shadow in iOS\uff1a `inset`,`offset-x`,`offset-y`, `blur-radius`,`color`
+
+
+### Note
+
+- box-shadow takes effect in iOS
+
+### Example
+
+```html
+<template>
+    <div class="wrapper">
+        <div style="width:400px; height:60px;background-color: #FFE4C4; box-shadow:20px  10px rgb(255, 69, 0);">
+            <text class="title" style="text-align: center">Hello {{target}}</text>
+        </div>
+        <div style="margin-top: 80px;width:400px; height:60px;background-color: #FFE4C4; box-shadow: 20px  10px 5px rgba(255, 69, 0, 0.8);">
+            <text class="title" style="text-align: center">Hello {{target}}</text>
+        </div>
+        <div style="margin-top: 80px;width:400px; height:60px;background-color: #FFE4C4; box-shadow:inset 20px  10px 5px rgba(255, 69, 0, 0.8);">
+            <text class="title" style="text-align: center">Hello {{target}}</text>
+        </div>
+        <div style="margin-top: 80px;width:400px; height:60px;background-color: #FFE4C4; box-shadow:inset 20px  10px 5px rgb(255, 69, 0);">
+            <text class="title" style="text-align: center">Hello {{target}}</text>
+        </div>
+        <div style="margin-top: 80px;width:400px; height:60px;background-color: #FFE4C4; box-shadow:20px  10px 5px black;">
+            <text class="title" style="text-align: center">Hello {{target}}</text>
+        </div>
+        <div style="margin-top: 80px;width:400px; height:60px;background-color: #FFE4C4; box-shadow:20px  10px 5px #008B00;">
+            <text class="title" style="text-align: center">Hello {{target}}</text>
+        </div>
+    </div>
+</template>
+
+<style scoped>
+    .wrapper {align-items: center; margin-top: 120px;}
+    .title {font-size: 48px;}
+</style>
+
+<script>
+    module.exports = {
+        data: function () {
+            return {
+                logoUrl: 'https://alibaba.github.io/weex/img/weex_logo_blue@3x.png',
+                target: 'World'
+            };
+        }
+    };
+</script>
+```
+
+
 ## Other Common Style
 
 - `opacity`

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a04dd259/doc/source/references/components/input.md
----------------------------------------------------------------------
diff --git a/doc/source/references/components/input.md b/doc/source/references/components/input.md
index 1033351..6542d59 100644
--- a/doc/source/references/components/input.md
+++ b/doc/source/references/components/input.md
@@ -29,6 +29,8 @@ This component supports no child components.
 
 * `maxlength`: <span class="api-version">v0.7+</span> a number value to specify maxlength of input.
 
+* `return-key-type {string}`\uff1a<sup class="wx-v">v0.11</sup>the keybord returen key type.
+
 ## Styles
 
 * placeholder-color: the color of placeholder. Default value is�'#999999'.
@@ -62,14 +64,20 @@ check out�[common styles for components](../common-style.html)
 * change: the change event is fired when a change to the component's value is commited by the user. It always come after a�'blur'�event.
 * focus: a component has received focus.
 * blur: a component has lost focus.
+* `return`:the return key click.
+
+     the object property of event:
+
+    - `returnKeyType`: return key Type  of component
+    - `value`: component text value
 
 ### common events
 check out [common events](../common-event.html)
 
-* support�'appear'�/�'disappear'�event. 
+* support�'appear'�/�'disappear'�event.
 
 
-### Methoads 
+### Methoads
 
  - `focus()` <span class="api-version">v0.9+</span>
 
@@ -79,6 +87,15 @@ check out [common events](../common-event.html)
 
   The `blur()` method is used to remove focus from an input component and close soft keybord(if it has focus).
 
+- `setSelectionRange(selectionStart,selectionEnd)`  <span class="api-version">v0.11+</span>set text selection range of input or textarea
+
+  - `selectionStart {number}`:set starting location text selection range
+  - `selectionEnd {number}`:set end location text selection range
+
+- `getEditSelectionRange(callback[selectionStart,selectionEnd])`  <span class="api-version">v0.11+</span>get text selection range of input or textarea
+    - `selectionStart {number}`:get starting location text selection range
+    - `selectionEnd {number}`: get end location text selection range
+
 ### Notes
 does not support the common-event�'click'. Please listen to the�'input'�or�'change'�event instead.
 
@@ -151,4 +168,4 @@ does not support the common-event�'click'. Please listen to the�'input'�or�'
 </style>
 ```
 
-[try it](../../examples/input.html)
\ No newline at end of file
+[try it](../../examples/input.html)

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a04dd259/doc/source/references/modules/dom.md
----------------------------------------------------------------------
diff --git a/doc/source/references/modules/dom.md b/doc/source/references/modules/dom.md
index bfd80e0..33cc4d2 100644
--- a/doc/source/references/modules/dom.md
+++ b/doc/source/references/modules/dom.md
@@ -24,6 +24,7 @@ Scroll the page to the specified node. This API should only be used on the eleme
 * `node`*(Node)*: an element that scrolled into the view.
 * `options`*(object)*: some options.
   * `offset`*(number)*: An offset to the visible position, default is `0`.
+  * `animated` *(bool)*�:set element animation, default true
 
 #### Example
 
@@ -201,4 +202,4 @@ Example Useage:
 </style>
 ```
 
-[try it](../../examples/dom-rect.html)
\ No newline at end of file
+[try it](../../examples/dom-rect.html)