checkbox and radio unit test

This commit is contained in:
cookfront
2017-04-17 14:12:05 +08:00
parent 4616351575
commit cd049aa2a1
5 changed files with 315 additions and 45 deletions
+1 -3
View File
@@ -79,8 +79,6 @@ export default {
isChecked() {
if ({}.toString.call(this.currentValue) === '[object Boolean]') {
return this.currentValue;
} else if (Array.isArray(this.currentValue)) {
return this.currentValue.indexOf(this.name) > -1;
}
},
@@ -89,7 +87,7 @@ export default {
*/
isDisabled() {
return this.isGroup && this.parentGroup
? this.parentGroup.disabled || this.disabled
? this.parentGroup.disabled
: this.disabled;
}
},