Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mounted() {
this.foundation = new MDCSwitchFoundation({
addClass: className => this.$set(this.classes, className, true),
removeClass: className => this.$delete(this.classes, className),
setNativeControlChecked: checked => (this.nativeControlChecked = checked),
setNativeControlDisabled: disabled =>
(this.nativeControlDisabled = disabled),
});
this.foundation.init();
this.foundation.setChecked(this.checked);
this.foundation.setDisabled(this.disabled);
this.ripple = new RippleBase(this);
this.ripple.init();
},
beforeDestroy() {
mounted() {
this.foundation = new MDCSwitchFoundation({
addClass: className => this.$set(this.classes, className, true),
removeClass: className => this.$delete(this.classes, className),
setNativeControlChecked: checked => (this.nativeControlChecked = checked),
setNativeControlDisabled: disabled =>
(this.nativeControlDisabled = disabled),
});
this.foundation.init();
this.foundation.setChecked(this.checked);
this.foundation.setDisabled(this.disabled);
this.ripple = new RippleBase(this);
this.ripple.init();
},
beforeDestroy() {