mand-mobile/components/selector
Shawn Xu ea1bdc80d7 Fix selector scroll (#159)
* fix(scroll-view):fix content can not respond to click events

* fix(selector):fix click penetration #157

* doc(popup):update prevent-scroll
2018-07-24 13:16:28 +08:00
..
demo Fix selector scroll (#159) 2018-07-24 13:16:28 +08:00
test Initial commit 2018-03-26 16:04:04 +08:00
README.en-US.md doc:add a version number identifier for new features 2018-06-28 00:21:08 +08:00
README.md doc:add a version number identifier for new features 2018-06-28 00:21:08 +08:00
component.js Initial commit 2018-03-26 16:04:04 +08:00
index.vue Fix selector scroll (#159) 2018-07-24 13:16:28 +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-index the index of initially selected item Number - -
invalid-index the index of disabled item Number - -
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-closable1.3.0+ 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
option-render return rendering contents of each option Function({value, text ,...}):String - vue 2.1.0+ can use slot-scope, refer to Radio
max-height1.3.0+ 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