DropMenu

Drop-down menu is for list filtering

Import

import { DropMenu } from  'mand-mobile-next'

Vue.createApp().component(DropMenu.name, DropMenu)

Code Examples

API

DropMenu Props

PropsDescriptionTypeDefaultNote
datadata sourceArray<{text, disabled, options, ...}>[]disabled is whether to disable a button or not; the type of options is Array<{text, disabled, ...}>
default-valueinitial valueArray<String>[]-
option-renderreturn rendering contents of each optionFunction({text, disabled, ...}):String-vue 2.1.0+ can use slot-scope,refer to Radio

DropMenu Methods

getSelectedValue(index): listItem

Get selected value of a barItem

ParametersDescriptionTypeDefault
indexindex of barItemNumber-

Returns

PropsDescriptionType
listItemdata of listItemObject: {text, disabled, options, ...}
getSelectedValues(): listItems

Get selected values of all barItem

Returns

PropsDescriptionType
listItemsdataset of listItemArray<{text, disabled, options, ...}>

DropMenu Events

@change(barItem, listItem)

Select some event

PropsDescriptionType
barItemdata of barItemObject: {text, disabled, options, ...}
listItemdata of listItemObject: {text, disabled, ...}
@show()

Show events on drop-down menu

@hide()

Hide events on drop-down menu