Update switch.vue

This commit is contained in:
梁灏 2021-09-16 16:32:11 +08:00
parent ebf885fbdd
commit 46c7303289

View file

@ -129,7 +129,7 @@
}, },
watch: { watch: {
value (val) { value (val) {
if (val !== this.trueValue && val !== this.falseValue) { if (val !== this.trueValue && val !== this.falseValue && val !== null) {
throw 'Value should be trueValue or falseValue.'; throw 'Value should be trueValue or falseValue.';
} }
this.currentValue = val; this.currentValue = val;