mand-mobile/components/drop-menu
moyus 03f4311dee style: clean styles 2018-09-03 17:28:32 +08:00
..
demo feat(drop-menu): update style 2.0 2018-08-14 14:54:22 +08:00
test Initial commit 2018-03-26 16:04:04 +08:00
README.en-US.md correct drop-down menu 2018-05-29 16:57:00 +08:00
README.md doc(readme): adjust the example path for each component in its readme doc. 2018-03-29 14:56:07 +08:00
component.js Initial commit 2018-03-26 16:04:04 +08:00
index.vue style: clean styles 2018-09-03 17:28:32 +08:00

README.en-US.md

title preview
Drop-down Menu https://didi.github.io/mand-mobile/examples/#/drop-menu

Drop-down menu is for list filtering

Import

import { DropMenu } from 'mand-mobile'

Vue.component(DropMenu.name, DropMenu)

Code Examples

API

DropMenu Props

Props Description Type Default Note
data data source Array<{text, disabled, options, ...}> [] disabled is whether to disable a button or not; the type of options is Array<{text, disabled, ...}>
defaultValue initial value Array [] -
option-render return rendering contents of each option Function({text, disabled, ...}):String - vue 2.1.0+ can use slot-scoperefer to Radio

DropMenu Methods

getSelectedValue(index): listItem

Get selected value of a barItem

Parameters Description Type Default
index index of barItem Number -

Returns

Props Description Type
listItem data of listItem Object: {text, disabled, options, ...}
getSelectedValues(): listItems

Get selected values of all barItem

Returns

Props Description Type
listItems dataset of listItem Array<{text, disabled, options, ...}>

DropMenu Events

@change(barItem, listItem)

Select some event

Props Description Type
barItem data of barItem Object: {text, disabled, options, ...}
listItem data of listItem Object: {text, disabled, ...}
@show()

Show events on drop-down menu

@hide()

Hide events on drop-down menu