mand-mobile/components/selector
xuxiaoyan d1f7e51901 doc: update readme 2018-11-19 18:59:56 +08:00
..
demo feat(selector): code refactor 2018-09-22 22:20:10 +08:00
test feat(selector): code refactor 2018-09-22 22:20:10 +08:00
README.en-US.md doc: update readme 2018-11-19 18:59:56 +08:00
README.md doc: update readme 2018-11-19 18:59:56 +08:00
component.js Initial commit 2018-03-26 16:04:04 +08:00
index.vue fix(update icon style): 2018-10-15 16:22:21 +08:00

README.en-US.md

title preview
Selector https://didi.github.io/mand-mobile/examples/#/selector

For selecting an item from the popup list

Import

import { Selector } from 'mand-mobile'

Vue.component(Selector.name, Selector)

Code Examples

API

Selector Props

Props Description Type Default Note
v-model display selector or not Boolean false -
data data source Array<{value,text,...}> [] label can be a html fragment
default-value the value of initially selected item String - -
title the title of selector String - -
ok-text confirmation text String - if empty, it will be confirmed mode, that is, click to select directly
cancel-text cancellation text String cancel -
mask-closable if the popup will be closed when clicking mask Boolean true -
is-check has a check icon or not Boolean false only for confirmed mode
max-height the maximum height of selectable area Number 400 unit px

Selector Events

@choose({value, text, ...})

Select one item

@confirm({value, text, ...})

Confirm selection

@cancel()

Cancel selection

@show()

Show selector

@hide()

Hide selector

Selector Slots

<md-selector>
  <template slot-scope="{ option }">
    <div class="md-selector-custom-title">Hello, {{ option.text }}</div>
  </template>
</md-selector>