change(newVal) {
      this.$emit('change', newVal)
      if (!this.resource) return
      this.processing = this.$axios[this.method](`${this.resource}`)
      const old = this.checked
      return this.processing
        .then(() => {
          this.processing = null
        })
        .catch(() => {
          this.processing = null
          this.$emit('change', old)
        })
    }
// If you use watch, might to occur infinite loops when revert checked state.
If you use watch, might to occur infinite loops when revert checked state.
If you use watch might to occur infinite loops when revert checked state .
change(newVal) {
      this.$emit('change', newVal)
      if (!this.resource) return
      this.processing = this.$axios[this.method](`${this.resource}`)
      const old = this.checked
      return this.processing
        .then(() => {
          this.processing = null
        })
        .catch(() => {
          this.processing = null
          this.$emit('change', old)
        })
    }
change ( newVal ) { this . $emit ( 'change' , newVal ) if ( ! this . resource ) return this . processing = this . $axios [ this . method ] ( ` ${ this . resource } ` ) const old = this . checked return this . processing . then ( ( ) => { this . processing = null } ) . catch ( ( ) => { this . processing = null this . $emit ( 'change' , old ) } ) }
If you use watch, might to occur infinite loops when revert checked state.
If you use watch might to occur infinite loops when revert checked state .