优化<checkbox>组件

This commit is contained in:
GoEdgeLab
2022-11-09 17:50:22 +08:00
parent a405eeb5ba
commit f73760b218

View File

@@ -35,7 +35,7 @@ Vue.component("checkbox", {
this.newValue = ""
},
isChecked: function () {
return this.newValue == this.elementValue
return (typeof (this.newValue) == "boolean" && this.newValue) || this.newValue == this.elementValue
}
},
watch: {