Use returned value from toggle component on change event
This commit is contained in:
@@ -92,8 +92,8 @@
|
||||
|
||||
methods: {
|
||||
toggle() {
|
||||
this.$refs.toggle.classList.toggle("on");
|
||||
this.$emit('change', this.$refs.toggle.classList.contains("on"));
|
||||
const containsOnClass = this.$refs.toggle.classList.toggle("on");
|
||||
this.$emit('change', containsOnClass);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user