mand-mobile/components/action-sheet
MeloHG a2e662032b fix: 修复部分组件找不到 vue 文件问题 2022-07-28 16:54:22 +08:00
..
demo example: remove old codesandbox & fix en title 2018-12-13 20:04:48 +08:00
test Update snapshots & test cases 2019-07-29 10:54:28 +08:00
README.en-US.md feat(title-bar): add prop large-radius for "Popup" ed components (#508) 2019-07-29 10:42:35 +08:00
README.md feat(title-bar): add prop large-radius for "Popup" ed components (#508) 2019-07-29 10:42:35 +08:00
action-sheet.vue Feat more locale (#751) 2021-07-16 13:24:11 +08:00
component.js Initial commit 2018-03-26 16:04:04 +08:00
index.js fix: 修复部分组件找不到 vue 文件问题 2022-07-28 16:54:22 +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)

this.$actionsheet.create({ /* ... */ }) // Totally Import

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 - -
large-radius 2.4.0+ large radius Boolean false -

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}>| [] |-| |defaultIndex|default selected index|Boolean|0|-| |invalidIndex|invalid index|Number| -1|-| |cancelText|cancel text|String|-|-| |maxHeight|the maximum height of actionsheet area|Number|400|unit px| |onShow|actionsheet show callback|Function|-|-| |onHide|actionsheet hide callback|Function|-|-| |onCancel|cancel selection callback|Function|-|-| |onSelected|selection callback|Function(item: {text, value})|-|-|

closeAll()

Close all global ActionSheets

destroyAll()

Close and destroy all global ActionSheets