vue2-ios-picker

1.0.8 • Public • Published

vue2-ios-picker

iOS style picker component for vue2.0

Thanks for picker by ustbhuangyi

Props

themeColor: '#000000' // define the color of confirm button text
title: 'Picker' // display in center of picker head
items: [
            [
                {
                    text: 'display',
                    value: 'for code'
                },
                {
                    text: 'display',
                    value: 'for code'
                }
            ],
            [
                {
                    text: 'display',
                    value: 'for code'
                },
                {
                    text: 'display',
                    value: 'for code'
                }
            ]
        ]  // require
selectedIndex: [0, 2, 3] // index of default select, default: [0, 0, 0]

Event

change // column stop scroll. params: column index, item index of this column
select // click confirm button. params: value array of all column, index array of all column
cancel // user close picker
value-change // click confirm button and this value is different from the previous one. params: value array of all column, index array of all column

Methods

show(next) // next a function, callback after showing picker. NOT require
hide() // close picker
scrollColumn(index, dist) // index is the index of target column, dist is the index of item you want to scroll to.

Demo

# install dependencies
yarn install
 
# serve with hot reload at localhost:8080
yarn run dev

Readme

Keywords

Package Sidebar

Install

npm i vue2-ios-picker

Weekly Downloads

9

Version

1.0.8

License

MIT

Last publish

Collaborators

  • cheiron