[Vuejs]-VueJS hide and show elements based on conditions

0👍

if i understand your purpose try this

data() {
       return {
         everydayCheck: false,
         weekdaysCheck: false,
         weekendCheck: false,
         customCheck: false,
         mondayCheck: false,
         tuesdayCheck: false,
         wednesdayCheck: false,
         thursdayCheck: false,
         fridayCheck: false,
         saturdayCheck: false,
         sundayCheck: false
         }
      },

you don’t need the v-model(this method is for binding input here for explanation)

//example for toggle-button of everydayCheck
<toggle-button @click="isDisabled(everydayCheck)" color="#82C7EB" :sync="false" :labels="false"/>
methods: {
       isDisabled: function(data){
          this.data = !this.data
       }
   }

Leave a comment