1.2.2 • Published 1 month ago
vue-scroll-picker v1.2.2
Vue Scroll Picker
iOS Style Scroll Picker Component for Vue 3. Support All Gestures of Mouse(also MouseWheel) and Touch.
If you are using vue 2, please refer to the v0.x branch.
Installation
npm i vue-scroll-picker
Usage
Global Registration
Vue3 Global Registration Guide
import { createApp } from "vue";
import VueScrollPicker from "vue-scroll-picker";
import "vue-scroll-picker/lib/style.css";
const app = createApp(); /* */
app.use(VueScrollPicker); // export default is plugin
Local Registration
<template>
<VueScrollPicker :options="options" />
</template>
<script>
import { VueScrollPicker } from 'vue-scroll-picker'
export default {
components: {
VueScrollPicker, // export VueScrollPicker is component
},
}
</script>
<style src="vue-scroll-picker/lib/style.css"></style>
Options
Props
Name | Type | Default | Example |
---|---|---|---|
modelValue | any | null | |
placeholder | string | null | |
empty | string | 'No Items' | |
options | string[] { name: string, value: any, disabled: boolean }[] | [] | ["10KG", "20KG", "30KG"] [{value: 10, name: "10KG"}, {value: 20, name: "20KG"}] |
dragSensitivity | number | 1.7 | |
touchSensitivity | number | 1.7 | |
scrollSensitivity | number | 1 |
Events
Name | Type |
---|---|
update:modelValue | (value: any) => void |
start | () => void |
move | (value: any) => void |
end | (value: any) => void |
cancel | () => void |
wheel | (value: any) => void |
click | (value: any, oldValue: any) => void |
Slots
Name | Prop | Default |
---|---|---|
default | { option: { name: string, value: any } } | {{ option.name }} |
placeholder | { text: string } | {{ placeholder }} |
empty | { text: string } | No Items |
1.2.2
1 month ago
1.2.0
1 month ago
1.2.1
1 month ago
1.1.4
3 months ago
1.1.3
2 years ago
1.1.2
2 years ago
1.1.1
2 years ago
0.8.1
2 years ago
0.8.2
2 years ago
1.1.0
3 years ago
0.8.0
3 years ago
0.7.1
3 years ago
1.0.1
3 years ago
0.7.0
3 years ago
1.0.0
3 years ago
1.0.0-rc.2
3 years ago
1.0.0-rc.1
3 years ago
0.6.1
4 years ago
0.6.0
4 years ago
0.5.0
4 years ago
0.4.1
4 years ago
0.4.0
4 years ago
0.3.0
5 years ago
0.2.0
5 years ago
0.1.4
7 years ago
0.1.3
7 years ago
0.1.2
7 years ago
0.1.1
7 years ago
0.1.0
7 years ago
0.0.5
7 years ago
0.0.4
7 years ago
0.0.3
7 years ago
0.0.2
7 years ago
0.0.1
7 years ago