vue-mobile-picker
v1.0.1
Published
A mobile picker for VueJs
Downloads
3
Readme
vue-mobile-picker
vue-mobile-picker is a picker for picker in vue,You can easily use this component.
Usage
npm install vue-mobile-picker -S
npm install better-picker --save-dev
How to use?
You can import the whole package or each module individual.
import VueMobilePicker from 'vue-mobile-picker'
Vue.use(VueMobilePicker)
create one you component
<picker :datas="datas" :title="title" @child-info="get"></picker>
this data of datas and title just like this:
| Name | Type | Necessary |Desc| | ------------- |:-------------:| -----:| -----:| | datas | Array | Yes |It's a two dimensional | | title | String | No |this picker's title |
datas:[
[
{
text: '小美',
value: 1
},
{
text: '猪猪',
value: 2
}
],
[
{
text: '张三',
value: 1
},
{
text: '李四',
value: 2
},
{
text: '王五',
value: 3
},
{
text: '赵六',
value: 4
},
{
text: '吴七',
value: 5
},
{
text: '陈八',
value: 6
},
{
text: '杜九',
value: 7
},
{
text: '黄十',
value: 8
},
{
text: '呵呵',
value: 9
},
{
text: '哈哈',
value: 10
},
{
text: '嘿嘿',
value: 11
},
{
text: '啦啦',
value: 12
}
],
[
{
text: '开心',
value: 1
}, {
text: '生气',
value: 2
},
{
text: '搞笑',
value: 3
}, {
text: '难过',
value: 4
}
]
],
How get the choice result
just call this method named get:
get(choiceData){ console.log(choiceData) }
Single row selection
Multi row selection
Run Demo
- npm install
- npm run dev