Repository: incubator-weex-site
Updated Branches:
  refs/heads/master ff1c81fc3 -> da4a81e4d


update doc of input&slider&pickers


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/bc465a5e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/tree/bc465a5e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/diff/bc465a5e

Branch: refs/heads/master
Commit: bc465a5e8e4159440ffc06006e0ae3b2bb599d59
Parents: 58feaa3
Author: moxun.ljf <moxun....@alibaba-inc.com>
Authored: Thu Mar 22 12:02:23 2018 +0800
Committer: moxun.ljf <moxun....@alibaba-inc.com>
Committed: Thu Mar 22 12:02:23 2018 +0800

----------------------------------------------------------------------
 source/cn/references/components/input.md  | 10 +++++++++-
 source/cn/references/components/slider.md |  4 ++++
 source/cn/references/modules/picker.md    |  9 +++++++++
 source/references/components/input.md     | 10 +++++++++-
 source/references/components/slider.md    |  4 ++++
 source/references/modules/picker.md       |  9 +++++++++
 6 files changed, 44 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/bc465a5e/source/cn/references/components/input.md
----------------------------------------------------------------------
diff --git a/source/cn/references/components/input.md 
b/source/cn/references/components/input.md
index c97dc04..6782b29 100644
--- a/source/cn/references/components/input.md
+++ b/source/cn/references/components/input.md
@@ -125,9 +125,17 @@ Weex 内置的 `<input>` 
组件用来创建接收用户输入字符的输入组
 - `setSelectionRange(selectionStart,selectionEnd)`  <span 
class="api-version">v0.11+</span>设置文本选区
   - `selectionStart {number}`:设置文本选区的起始点
   - `selectionEnd {number}`:设置文本选区的起终点
-- `getEditSelectionRange(callback[selectionStart,selectionEnd])`  <span 
class="api-version">v0.11+</span>设置文本选区
+- `getSelectionRange(callback[selectionStart,selectionEnd])`  <span 
class="api-version">v0.11+</span>设置文本选区
     - `selectionStart {number}`:获取文本选区的起始点
     - `selectionEnd {number}`:获取文本选区的起终点
+- `setTextFormatter(params)`<span 
class="api-version">v0.18+</span>:这是一个非常有用的特性,可以对input设置一组对输å
…¥çš„内容进行实时格式化的规则。
+    - `params {object}`:格式化规则,包含以下参数:
+      - `formatRule {regexp}`:格式化匹配的正则表达式
+      - `formatReplace {string}`:格式化匹配后用于替换的内容
+      - `recoverRule {regexp}`:从格式化后的内容还原原始内
容的正则表达式
+      - `recoverReplace {string}`:还原原始内容时用于替换的内容
+
+`setTextFormatter` 的详细使用方法请参照 
[示例](http://dotwe.org/vue/bea3cb0cad697829d8d343552a2b7b77)
 ## 约束
 
 目前不支持 `this.$el(id).value = ''` 这种方式改写 input 
value。只支持在 `<input>` 组件的 `input`、`change` 事件中改写。

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/bc465a5e/source/cn/references/components/slider.md
----------------------------------------------------------------------
diff --git a/source/cn/references/components/slider.md 
b/source/cn/references/components/slider.md
index bb2098d..18feaaf 100644
--- a/source/cn/references/components/slider.md
+++ b/source/cn/references/components/slider.md
@@ -25,6 +25,10 @@ version: 2.1
 - `interval {number}`:值为毫秒数,此值设定 slider 
切换时间间隔。当 `auto-play` 值为 `true` 时生效。
 - `infinite {boolean}`:循环播放,可选值为 
`true`/`false`,默认的是 `true`。
 - `offset-x-accuracy {number}`<sup 
class="wx-v">0.11+</sup>:控制`onscroll`事件触发的频率,默认值为10,表示两次`onscroll`事件之间Slider
 
Page至少滚动了10px。注意,将该值设置为较小的数值会提高滚动事件采æ
 ·çš„精度,但同时也会降低页面的性能。
+- `show-indicators {boolean}`:设置是否显示indicator
+- `index {number}`:设置显示slider的第几个页面
+- `scrollable 
{boolean}`:设置是否可以通过滑动手势来切换slider页面
+- `keep-index 
{boolean}`:设置slider中的数据发生变化后是否保持变化前的页面index
 
 ## 样式
 

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/bc465a5e/source/cn/references/modules/picker.md
----------------------------------------------------------------------
diff --git a/source/cn/references/modules/picker.md 
b/source/cn/references/modules/picker.md
index ed1cff2..35e3db5 100644
--- a/source/cn/references/modules/picker.md
+++ b/source/cn/references/modules/picker.md
@@ -24,6 +24,15 @@ version: 2.1
 - `options {Object}`:调用单选 picker 选项
   - `index {number}`:默认选中的选项
   - `items {array}`:picker 数据源
+  - `textColor {color}`:picker中文字的颜色
+  - `selectionColor {color}`:picker中选中item的背景色
+  - `confirmTitle {string}`:确认按钮的文案
+  - `cancelTitle {string}`:取消按钮的文案
+  - `confirmTitleColor {color}`:确认按钮的文字颜色
+  - `cancelTitleColor {color}`:取消按钮的文字颜色
+  - `title {string}`:对话框的标题
+  - `titleColor {color}`:对话框标题的文字颜色
+  - `titleBackgroundColor {color}`:对话框标题的背景色
 
 - `callback {function (ret)}`:执行完读取操作后的回调函数。`ret 
{Object}` 为 `callback` 函数的参数,有两个属性:
   - `result {string}`:结果三种类型 `success`, `cancel`, `error`

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/bc465a5e/source/references/components/input.md
----------------------------------------------------------------------
diff --git a/source/references/components/input.md 
b/source/references/components/input.md
index a618ba4..2c2e29b 100644
--- a/source/references/components/input.md
+++ b/source/references/components/input.md
@@ -103,10 +103,18 @@ check out [common events](../common-event.html)
   - `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
+- `getSelectionRange(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
 
+- `setTextFormatter(params)`<span class="api-version">v0.18+</span>: This is a 
very useful feature,can be used to set a set of rules for the input to 
formatting the input content in real-time.
+    - `params {object}`:formatting rules, contains the following parameters:
+      - `formatRule {regexp}`: Regular expression used to format the match
+      - `formatReplace {string}`: Contents to replace after format matching
+      - `recoverRule {regexp}`: Regular expressions to restore original 
content from formatted content
+      - `recoverReplace {string}`: Content to replace when restoring original 
content
+
+For details of `setTextFormatter`, please refer to 
[sample](http://dotwe.org/vue/bea3cb0cad697829d8d343552a2b7b77)
 ### Notes
 input does not support the common-event `click`. Please listen to the 
`input` or `change` event instead.
 

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/bc465a5e/source/references/components/slider.md
----------------------------------------------------------------------
diff --git a/source/references/components/slider.md 
b/source/references/components/slider.md
index 920a6b8..74c8487 100644
--- a/source/references/components/slider.md
+++ b/source/references/components/slider.md
@@ -22,6 +22,10 @@ It supports all kinds of weex components as its slides, 
especially the `indicato
 - `interval`: &lt;number&gt; millisecond. This value determines time interval 
for each page displayed in slider.
 - `index`: <number> . This value determines the  index of current shown slide. 
The default value is `0`.
 - `offset-x-accuracy {float}`:set the scroll event trigger precision, 
precision value represents the rolling distance of a page width ratio.
+- `show-indicators {boolean}`:set whether to display indicator
+- `infinite {boolean}`:set whether the page in the slider can be scrolled
+- `scrollable {boolean}`:set whether slider pages can be switched by sliding 
gestures
+- `keep-index {boolean}`:set whether to maintain the index of the page after 
the data changes
 
 ## Styles
 

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/bc465a5e/source/references/modules/picker.md
----------------------------------------------------------------------
diff --git a/source/references/modules/picker.md 
b/source/references/modules/picker.md
index 1ecdedf..e8ecac0 100644
--- a/source/references/modules/picker.md
+++ b/source/references/modules/picker.md
@@ -24,6 +24,15 @@ pick data(single column)
 - `options {Object}`:pick options
   - `index {number}`:default selected row
   - `items {array}`:picker's data
+  - `textColor {color}`:text color in the picker item
+  - `selectionColor {color}`:the background color of the selected item in 
the picker
+  - `confirmTitle {string}`:confirm button text
+  - `cancelTitle {string}`:cancel button text
+  - `confirmTitleColor {color}`:confirm button text color
+  - `cancelTitleColor {color}`:cancel button text color
+  - `title {string}`:title of dialog
+  - `titleColor {color}`:text color of the dialog title
+  - `titleBackgroundColor {color}`:background color of the dialog title
 
 - `callback {function (ret)}`:the callback function after executing this 
action.`ret {Object}` is `callback` 's parameter:
   - `result {string}`:result is one of success,cancel,error

Reply via email to