Skip to content

Commit 3453103

Browse files
committed
#340 fixed setting null value from predefined parameters
1 parent 4cbf43d commit 3453103

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

web-src/src/common/components/checkbox.vue

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
export default {
1616
props: {
1717
'value': {
18-
type: [Boolean, String, Number],
19-
default: false
18+
type: [Boolean, String, Number]
2019
},
2120
'config': Object
2221
},
@@ -35,6 +34,19 @@
3534
emitValueChange() {
3635
this.$emit('input', this.$refs.checkbox.checked);
3736
}
37+
},
38+
39+
watch: {
40+
value: {
41+
immediate: true,
42+
handler() {
43+
this.$nextTick(() => {
44+
if (this.value !== this.boolValue) {
45+
this.emitValueChange();
46+
}
47+
});
48+
}
49+
}
3850
}
3951
}
4052
</script>

0 commit comments

Comments
 (0)