3.0.4 • Published 2 years ago

vue-3-better-picker v3.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

vue-better-picker

image

Mobile picker component for Vue 3 that forked from openfe-openfe/vue-better-picker.

If you want to use it with Vue 2, please check the vue2 branch.

Demo

Open Demo App or scan the QR code below with your mobile device.

QR_455628

Install

$ yarn add vue-3-better-picker
# npm install vue-3-better-picker --save

Usage

<template>
  <div>
    <BetterPicker v-model="show" :data="pickerData" @select="onSelect" />
  </div>
</template>

<script setup>
import { ref } from "vue";
import BetterPicker from "vue-3-better-picker";

const show = ref(true);
const pickerData = [
  // left slot
  [
    { value: "a", text: "A" },
    { value: "b", text: "B" },
    { value: "c", text: "C" },
  ],
  // center slot
  [
    { value: "a", text: "A" },
    { value: "b", text: "B" },
    { value: "c", text: "C" },
  ],
  // right slot
  [
    { value: "a", text: "A" },
    { value: "b", text: "B" },
    { value: "c", text: "C" },
  ],
];
const onSelect = (selectedValues) => {
  console.log(selectedValues);
};
</script>

Props

nametypedescription
modelValueArrayBasic object for picker (Usually bound by v-model)
titleStringText displayed in the top center
cancelTextStringCancel button text
confirmTextStringOK button text
selectedIndexArrayInitial values of the selected state

Contribution

You can start developing immediately with the following command and open http://localhost:8080.

$ yarn dev

Please feel free to create a PR or Issue.

3.0.4

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.1

2 years ago