[Vuejs]-How to hide button in vuejs and laravel

2👍

If you change the hidebutton function like below the function returns a boolean value so you vue can handle the show/hide state with v-show property.

hidebutton() {
    return employees.data!==undefined || employees.data !== '' || employees.data !== null;
}

1👍

The v-show value “hidebutton” must be also declared in the data-property of your Vue instance.
If it has the value “false” the button will be hidden and viceversa.
You can set “hidebutton” dynamically.

Leave a comment