dropup2
v0.1.5
Published
A reusable Vue.js component for a dropup select menu. The component takes a prop: options: the options to pass into your dropup, each option must contain a name field. An option may contain also a description field, where you can add a description to yo
Downloads
3
Readme
A reusable Vue.js component for a dropup select menu. The component takes a prop: options: the options to pass into your dropup, each option must contain a name field. An option may contain also a description field, where you can add a description to your options. The dropup emits the selected data back up to its parent-DropUpContainer.vue
<div>
<drop-up
:options="myOptions"
@select="select"
@clear= "clear"
></drop-up>
</div>
<script>
import DropUp from "./DropUp";
export default {
name: "DropUpContainer",
data(){
return{
myOptions:[{name:'apples', description :'$2.00'}],
selected: null
}
},
methods: {
select(user) {
this.selected = user;
},
clear() {
this.selected = {};
},
},
components: {DropUp}
}
</script>