[Improvement] add checkbox labelDisabled test case (#650)

This commit is contained in:
neverland
2018-02-27 09:46:36 +08:00
committed by GitHub
parent d7403a0241
commit 1e10a65a18
3 changed files with 20 additions and 2 deletions

View File

@@ -100,8 +100,8 @@ export default create({
},
methods: {
onClick(flag) {
if (!this.isDisabled && (flag !== 'label' || (flag === 'label' && !this.labelDisabled))) {
onClick(target) {
if (!this.isDisabled && !(target === 'label' && this.labelDisabled)) {
this.currentValue = !this.currentValue;
}
}