1.0.8 • Published 6 years ago

vue2-ios-picker v1.0.8

Weekly downloads
12
License
MIT
Repository
github
Last release
6 years ago

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
1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago