0.8.0 • Published 4 years ago

vue-scroll-picker v0.8.0

Weekly downloads
1,241
License
MIT
Repository
github
Last release
4 years ago

Vue Scroll Picker

iOS Style Scroll Picker Component for Vue 2. Support All Gestures of Mouse(also MouseWheel) and Touch.

If you are using vue 3, please refer to the main.

See Example (sources)

Installation

npm i vue-scroll-picker@vue2

Usage

CSS

Import css file (only version v0.2 or later).

import "vue-scroll-picker/dist/style.css"

ES6

import Vue from "vue"
import VueScrollPicker from "vue-scroll-picker"

Vue.use(VueScrollPicker)

or

import Vue from "vue"
import { ScrollPicker, ScrollPickerGroup } from "vue-scroll-picker"

new Vue({
  components: {
    ScrollPicker,
    ScrollPickerGroup,
  }
})

Globals

<html>
<head>
  ...
</head>
<body>
  <div id="app">
    <scroll-picker :options="[1, 2, 3, 4, 5]"></scroll-picker>
  </div>

  <script src="//cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
  <script src="//cdn.jsdelivr.net/npm/vue-scroll-picker/dist/index.js"></script>
  <script>
    new Vue({ el: "#app", })
  </script>
</body>
</html>

Options

Props

NameTypeDefaultExample
modelValueanynull
placeholderstringnull
emptystring'No Items'
optionsstring[]{ name: string, value: any }[][]["10KG", "20KG", "30KG"][{value: 10, name: "10KG"}, {value: 20, name: "20KG"}]
dragSensitivitynumber1.7
touchSensitivitynumber1.7
scrollSensitivitynumber1

Event

  • @input : you can use v-model :-)

Styling

1.2.3

1 year ago

1.2.2

1 year ago

1.2.0

1 year ago

1.2.1

1 year ago

1.1.4

1 year ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

0.8.1

3 years ago

0.8.2

3 years ago

1.1.0

4 years ago

0.8.0

4 years ago

0.7.1

4 years ago

1.0.1

4 years ago

0.7.0

4 years ago

1.0.0

4 years ago

1.0.0-rc.2

4 years ago

1.0.0-rc.1

4 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago