06
AugIgor Guastalla launched a Vue list Picker made with vue js. It is a dual list picker component for Vue.js, which allows the users to move list items between two panels.
You’ve to run this command for the installation via npm:
$ npm install vue-list-picker --save
Or you can install it via Yarn:
$ yarn add vue-list-picker
Vue.js
You can import in your main.js file
import Vue from "vue";
import VueListPicker from "vue-list-picker";
Vue.use(VueListPicker);
Or locally in any component
import { VueListPicker } from "vue-list-picker";
export default {
components: {
VueListPicker,
},
};
Nuxt.js
You can import as a Nuxt.js plugin
~/plugins/vue-list-picker.js
import Vue from "vue";
import VueListPicker from "vue-list-picker";
Vue.use(VueListPicker);
And then you have to import it in your nuxt.config.js file.
plugins: ["~/plugins/vue-list-picker.js"];
There’s a window mouseup event listener so you should use the
<template>
<vue-list-picker :left-items="leftItems" :right-items="rightItems" />
</template>
<script>
export default {
data() {
const example1 = {
key: 1,
content: "Item 1",
};
const example2 = {
key: 2,
content: "Item 2",
};
const example3 = {
key: 3,
content: "Item 3",
};
const example4 = {
key: 4,
content: "Item 4",
};
const leftItems = [example1, example2];
const rightItems = [example3, example4];
return { leftItems, rightItems };
},
};
</script>
You can view its demo here:
https://vuelistpicker.now.sh
Generics
Actions
From top to bottom:
If you want to dig more about it, You can visit Github for its detailed documentation.
Published at : 06-08-2021
I am a highly results-driven professional with 12+ years of collective experience in the grounds of web application development especially in laravel, native android application development in java, and desktop application development in the dot net framework. Now managing a team of expert developers at Codebrisk.
Launch project