Repository: incubator-weex-site
Updated Branches:
  refs/heads/master 1a6d8cedd -> fd309599c


update doc for input


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

Branch: refs/heads/master
Commit: 19aa2e914e9820ad21df7d81c01a240e590890f7
Parents: e897c58
Author: moxun.ljf <[email protected]>
Authored: Thu Jan 18 12:26:55 2018 +0800
Committer: moxun.ljf <[email protected]>
Committed: Thu Jan 18 12:26:55 2018 +0800

----------------------------------------------------------------------
 source/cn/references/components/input.md | 13 +++++--
 source/references/components/input.md    | 53 +++++++++++++++++----------
 2 files changed, 42 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/19aa2e91/source/cn/references/components/input.md
----------------------------------------------------------------------
diff --git a/source/cn/references/components/input.md 
b/source/cn/references/components/input.md
index 654a27d..c97dc04 100644
--- a/source/cn/references/components/input.md
+++ b/source/cn/references/components/input.md
@@ -8,11 +8,11 @@ version: 2.1
 
 # &lt;input&gt;
 
-Weex 内置的 `<input>` 组件用来创建接收用户输入字符的输å…
¥ç»„件。 `<input>` 组件的工作方式因 `type` 
属性的值而异,比如 `<text>`, `password`,`url`,`email`,`tel` 
等。
+Weex 内置的 `<input>` 组件用来创建接收用户输入字符的输å…
¥ç»„件。 `<input>` 组件的工作方式因 `type` 
属性的值而异,比如 `text`, `password`,`url`,`email`,`tel` 
等。
 
 **注意:** 
 
-此组件不支持 `click` 事件。请监听 `<input>` 或 `change` 
来代替 `click` 事件。
+此组件不支持 `click` 事件。请监听 `input` 或 `change` 
来代替 `click` 事件。
 
 ## 子组件
 
@@ -20,13 +20,18 @@ Weex 内置的 `<input>` 组件用来创建接收用户输å…
¥å­—符的输入组
 
 ## 特性
 
-- `type {string}`:控件的类型,默认值是 `<text>`。`type` 
值可以是 `text`,`password`,`url`,`email`,`tel` ,`number` 
。每个 `type` 值都符合 W3C 标准。
-- `value {string}`:组件的接收到的输入字符。
+- `type {string}`:控件的类型,默认值是 `<text>`。`type` 
值可以是 `text`,`date`,`datetime`,`email`, 
`password`,`tel`,`time`,`url`,`number` 。每个 `type` 值都符合 
W3C 标准。
+- `value {string}`:组件的默认内容。
 - `placeholder {string}`:提示用户可以输入什么。 
提示文本不能有回车或换行。
 - `disabled {boolean}`:布尔类型的数据,表示是否支持输å…
¥ã€‚通常 `click` 事件在 `disabled` 控件上是失效的。
 - `autofocus {boolean}`:布尔类型的数据,表示是否在页面加
载时控件自动获得输入焦点。
 - `maxlength {nubmer}`:<sup 
class="wx-v">v0.7</sup>一个数值类型的值,表示输入的最大长度。
 - `return-key-type {string}`:<sup 
class="wx-v">v0.11</sup>键盘返回键的类型,支持 
defalut;go;next;search;send,done。
+- `singleline {boolean}`:控制内容是否只允许单行
+- `max-length {number}`:控制输入内容的最大长度
+- `lines`:控制输入内容的最大行数
+- `max`:控制当`type`属性为`date`时选择日期的最大时间,æ 
¼å¼ä¸º`yyyy-MM-dd`
+- `min`:控制当`type`属性为`date`时选择日期的最小时间,æ 
¼å¼ä¸º`yyyy-MM-dd`
 
 ## 样式
 

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/19aa2e91/source/references/components/input.md
----------------------------------------------------------------------
diff --git a/source/references/components/input.md 
b/source/references/components/input.md
index c3d9967..a618ba4 100644
--- a/source/references/components/input.md
+++ b/source/references/components/input.md
@@ -14,13 +14,13 @@ The weex builtin component `input` is used to create 
input controls to receive
 
 ## Child Components
 
-This component supports no child components.
+This component does not support any child component.
 
 ## Attributes
 
-* `type`: the type of controls to display. The default value is `text`, if 
this attribute is not specified. Possible values are `text`, `password`, 
`tel`, `email`, `url` , `number` etc. each of which has the same meaning 
with W3C standard.
+* `type`: the type of controls to display. The default value is `text`, if 
this attribute is not specified. Possible values are `text`, `date`, 
`datetime`, `email`, `password`, `tel`, `time`, `url`, `number`. each of 
which has the same meaning with W3C standard.
 
-* `value`: the value(text) of the control.
+* `value`: the default value(text) of the control.
 
 * `placeholder`: a hint to the user of which can be entered to the control. 
The placeholder text must have no carriage returns or line-feeds.
 
@@ -28,9 +28,19 @@ This component supports no child components.
 
 * `autofocus`: a boolean attribute lets you specify that a form control should 
have input focus when the page loads.
 
+* `singleline`: a boolean sttribute sets the properties of this field (lines, 
horizontally scrolling, transformation method) to be for a single-line input.
+
+* `lines`: makes the input exactly this many lines tall.
+
+* `max-length`: constrain edits not to make the length of the text greater 
than the specified length.
+
+* `max` constrain the max date when `type` is `date`, format is `yyyy-MM-dd`
+
+* `min` constrain the min date when `type` is `date`, format is `yyyy-MM-dd` 
+
 * `maxlength`: <span class="api-version">v0.7+</span> a number value to 
specify maxlength of input.
 
-* `return-key-type {string}`:<sup class="wx-v">v0.11</sup>the keybord 
returen key type support defalut;go;next;search;send,done.
+* `return-key-type`:<sup class="wx-v">v0.11</sup>the keybord returen key 
type support `defalut`, `go`, `next`, `search`, `send`, `done`.
 
 ## Styles
 
@@ -45,27 +55,27 @@ This component supports no child components.
 
 * text styles: checkout [text styles](../text-style.html)
 
-  * support 'color' style.
-  * support 'font-size' style.
-  * support 'font-style' style.
-  * support 'font-weight' style.
-  * support 'text-align' style.
+  * support `color` style.
+  * support `font-size` style.
+  * support `font-style` style.
+  * support `font-weight` style.
+  * support `text-align` style.
 
 ### common styles
 check out [common styles for components](../common-style.html)
 
 * support flexbox related styles.
 * support box model related styles.
-* support 'position' related styles.
-* support 'opacity', 'background-color' etc.
+* support `position` related styles.
+* support `opacity`, `background-color` etc.
 
 ## Events
 
-* input: the value of an input character changes.
-* 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.
+* `input`: the input evenr is fired when input content changes.
+* `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 clicked.
 
      the object property of event:
 
@@ -75,7 +85,7 @@ check out [common styles for 
components](../common-style.html)
 ### common events
 check out [common events](../common-event.html)
 
-* support 'appear' / 'disappear' event.
+* support `appear` / `disappear` event.
 
 
 ### Methoads
@@ -98,12 +108,15 @@ check out [common events](../common-event.html)
     - `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.
+input does not support the common-event `click`. Please listen to the 
`input` or `change` event instead.
 
 ### Parameters of events' object
 
-* for 'input' and 'change' events:'value': the value of the component who 
dispatched this event.'timestamp': the time stamp of the event.
-* for 'focus' and 'blur' events:'timestamp': the time stamp of the event.
+* for `input` and `change` events:
+  - `value`: the value of the component who dispatched this event.
+  - `timestamp`: the time stamp of the event.
+* for `focus` and `blur` events:
+  - `timestamp`: the time stamp of the event.
 
 ## Example
 

Reply via email to