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`: <number> 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