0.1.5 • Published 4 years ago

dropup2 v0.1.5

Weekly downloads
19
License
-
Repository
-
Last release
4 years ago

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>
0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago