2.1.0 • Published 9 years ago

vue-3d-picker v2.1.0

Weekly downloads
19
License
ISC
Repository
github
Last release
9 years ago

Overview

The picker component based on vue.js

DEMO

vue-picker

Install

npm install vue-3d-picker --save
import picker from 'vue-3d-picker';

Register component:

Vue.component(picker.name, picker);

Base Usage

<picker v-model="visible" :data-items="items" @change="onValuesChange">
	<div class="top-content" slot="top-content">Top of the content.</div>
	<div class="bottom-content" slot="bottom-content">Bottom of the content.</div>
</picker>
export default {
  methods: {
    onValuesChange(result1, result2, ... ) {
      console.log(result1, result2)
    }
  },
  data() {
    return {
      visible: true,
      items: [
        {
          values: ['2000', '2001', '2002', '2003', '2004', '2005', '2006', '2007'],
        }, {
          values: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
        }
      ]
    }
  }
}

Options

Picker Options:

OptionDescription
v-modelBoolean(default: false) Picker show and hide.
:data-itemsArray(default: []) The configuration on the items.
@changeFunction() Listening when data changes.

Picker Items Options:

OptionDescriptionTypeDefault
indexitem default index position.Number0
valuesvalues of this item.Array[]
widthThe width of the item. The unit is %.String'flex'
nameIf values is an object. set the displayed key.String'value'
maxScrollValueThe maximum value for scrolling.Numbervalues.length

example

npm install

npm run dev

prompt

Need postcss-salad support

中文

Picker

2.1.0

9 years ago

2.0.5

9 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago