mand-mobile/components/action-sheet
xuxiaoyan f4c8a56afe test: update test 2018-12-09 20:38:10 +08:00
..
demo example: update demos for style 2018-12-03 21:29:22 +08:00
test test: update test 2018-12-09 20:38:10 +08:00
README.en-US.md fix(action-sheet): remove prop max-height & update style 2018-11-30 20:33:32 +08:00
README.md fix(action-sheet): remove prop max-height & update style 2018-11-30 20:33:32 +08:00
action-sheet.vue fix(action-sheet): remove prop max-height & update style 2018-11-30 20:33:32 +08:00
component.js Initial commit 2018-03-26 16:04:04 +08:00
index.js feat(action-sheet): Add static methods support #79 (#117) 2018-06-30 14:52:41 +08:00

README.en-US.md

title preview
ActionSheet https://didi.github.io/mand-mobile/examples/#/action-sheet

Support scenario-relevent operations

Import

import { ActionSheet } from 'mand-mobile'

Vue.component(ActionSheet.name, ActionSheet)

Code Examples

API

ActionSheet Props

Props Description Type Default Note
v-model display actionsheet or not Boolean false -
title title of actionsheet String - -
options options of actionsheet Array<{text, value}> [] -
default-index default selected index Boolean 0 -
invalid-index invalid index Number -1 -
cancel-text cancel text String - -

ActionSheet Events

@selected(item)

Select event

Props Description Type
item selected value Object: {text, value}
@selected(item)

Cancel selection

@show()

Show actionsheet

@hide()

Hide actionsheet

ActionSheet Static Methods

create(props)

Static create a global ActionSheet, and return instance. You can change instance value to toggle the visibility of ActionSheet.

|----|-----|------|------|------|------| |value|display actionsheet or not|Boolean|true|-| |title|title of actionsheet|String|-|-| |options|options of actionsheet|Array<{text, value}>| [] |-| |default-index|default selected index|Boolean|0|-| |invalid-index|invalid index|Number| -1|-| |cancel-text|cancel text|String|-|-| |max-height|the maximum height of actionsheet area|Number|400|unit px|

closeAll()

Close all global ActionSheets

destroyAll()

Close and destroy all global ActionSheets