0.0.5 • Published 9 years ago
hsy-vue-dropdown v0.0.5
vue-dropdown
This is yet another vue dropdown component.
Install
Use npm to download code:
npm install hsy-vue-dropdown -Sthen import it into your project, add below code into your main.js:
import Dropdown from 'hsy-vue-dropdown'
Vue.use(Dropdown)Usage
<template>
<dropdown :data="data" :cbChanged="changed"></dropdown>
</template>
<script>
const data = [{
label: 'Volvo',
value: 1
}, {
label: 'Saab',
value: 2
}, {
label: 'Long long long long long long test',
value: 2
}]
export default {
data() {
return {
data
}
},
methods: {
changed(selected) {
console.log(selected)
}
}
}
</script>Props
Coming...