vue-clickaway icon indicating copy to clipboard operation
vue-clickaway copied to clipboard

thx, big work for me

Open blstdmi opened this issue 6 years ago • 2 comments

can you record a video of how the main mechanism works? how the plugin works.. as it was written.. can be explain to on what occupations https://scrimba.com

I use the code for the checkbox menu thx!

<input v-model="checked" type="checkbox" id="checkbox-menu">
        <label for="checkbox-menu">checkbox menu</label>
        <div   v-on-clickaway="away" class="menu_elements"> .... </div>
      mixins: [ clickaway ],
        name: "bodyfooter",
      data(){return{
        checked: false
        }
      },
      methods: {
        away: function() {
        //  console.log('clicked away');
          //this.checked = !this.checked
          if (this.checked){
            this.checked = 0
          }

        },

blstdmi avatar Jun 20 '19 19:06 blstdmi

add for fix..

          if (this.checked){
            console.log(event)
            this.checked = 0
            if(event.target.getAttribute("for")== "checkbox-menu")

            this.checked = 1
          }

blstdmi avatar Jun 20 '19 19:06 blstdmi

but maybe change code to https://codepen.io/lerte/pen/XgqrOr

blstdmi avatar Jun 20 '19 22:06 blstdmi