Skip to content

Commit 3ad3552

Browse files
authored
Update README.md
1 parent 7312185 commit 3ad3552

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

README.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -345,16 +345,15 @@ npm install mobile-select -D
345345

346346
|Option|Default|Type|Description |
347347
| ------ |------|-----|-----|
348-
|trigger|Required parameter No default value|String| The id/class/tag of the trigger object |
349-
|wheels|Required parameter No default value|Array|The data displayed on the wheel|
348+
|trigger|Required parameter. No default value|String| The id/class/tag of the trigger object |
349+
|wheels|Required parameter. No default value|Array|The data displayed on the wheel|
350+
|callback|function(indexArr, data){}|function | A callback function after successful selected, return parameter (indexArr, data) |
351+
|transitionEnd|function(indexArr, data){}|function|A callback function that after each gesture sliding, return parameter (indexArr, data)|
352+
|onShow|function(e){}|function | A callback when the window is show, return object itself as parameter |
353+
|onHide|function(e){}|function | A callback when the window is hidden, return object itself as parameter|
350354
|title|`''`|String|Component title|
351355
|position|[0,0,0,…]|Array|Initialize positioning|
352356
|connector|`' '`|String| When there are multiple wheels, set the connection to connect multiple values, the default value is a space |
353-
| callback|function(indexArr, data){}|function | Select the callback function triggered after successful, return parameter (indexArr, data)|
354-
| onShow|function(){}|function | Display a callback on the window|
355-
| onHide|function(){}|function | A callback when the window is hidden|
356-
|cancel|function(indexArr, data){}|function | Click the Cancel button to trigger the callback function and return to the last parameter (indexArr, data)|
357-
|transitionEnd|function(indexArr, data){}|function|A callback function that after each gesture sliding, return parameter (indexArr, data)|
358357
|ensureBtnText|`'确认'`|String| The text content of comfirm button |
359358
|cancelBtnText|`'取消'`|String| The text content of cancel button |
360359
|ensureBtnColor|`'#1e83d3'`|String| The text color of the comfirm button|
@@ -374,12 +373,12 @@ npm install mobile-select -D
374373
## Functions:
375374
|Function|Arguments| Description|
376375
| ------ |------| -----|
376+
|show()| no-argument | show the compontent |
377+
|hide()| no-argument | hide the compontent |
377378
|setTitle()| string |Set the title of the component|
378379
|locatePosition()|sliderIndex, posIndex|Pass the position array parameter, relocate the position of the wheel|
379380
|updateWheel()| sliderIndex, data | Re-render the specified wheel |
380381
|updateWheels()| data | Re-render the all wheel(Only used in cascading data forma) |
381-
|show()| no-argument | show the compontent |
382-
|hide()| no-argument | hide the compontent |
383382
|getValue()| no-argument | Gets the value selected by the component |
384383

385384

@@ -428,7 +427,7 @@ Use the transitionEnd (), callback (), updateWheel (), locatePosition () functio
428427

429428

430429
## Logs
431-
### 2017-04-20[update]  
430+
### 2017-04-20[update]
432431
As the input tag in the iphone, the cursor will flashing.
433432
As well as the input tag open in the iphone6P / iphone7P chrome will appear offset phenomenon.
434433
So do not use the input tag, instead by the ordinary div trigger.
@@ -452,8 +451,8 @@ The updateWheel() method does not change.
452451
Add new API: updateWheels(data) is used to update the entire data source in cascading data format.
453452

454453

455-
### 2017-08-15[update]    
456-
Repair in cascade state, single click failed.    
454+
### 2017-08-15[update]
455+
Repair in cascade state, single click failed.
457456
Delete the comment after the brace in the js file(In the php environment there will be js code failure situation).
458457
Fix ios potential bug.
459458
Add API: show()
@@ -471,13 +470,20 @@ textColor
471470
Supports color formats such as #ff0000 rgba(0,255,255,0.5) orange.
472471

473472

474-
### 2017-09-07[update]  
473+
### 2017-09-07[update]
475474
Add keyMap function
476-
update README
475+
Update README
477476

478-
### 2017-10-17[update]    
477+
### 2017-10-17[update]
479478
Add cancel callback
480479

480+
### 2017-12-12[update]
481+
Remove cancel callback
482+
Thanks for [ngdly]:
483+
Add onshow callback
484+
Add onhide callback
485+
Add show function
486+
Add hide function
481487

482488
## License
483489

0 commit comments

Comments
 (0)