From dfddd5d8579434364699617b6e01a10b0435a32b Mon Sep 17 00:00:00 2001 From: Mathieu DARTIGUES Date: Thu, 23 Mar 2017 09:01:48 +0100 Subject: [PATCH] Rename minimum/maximum to min/max, type to Number --- packages/checkbox/src/checkbox-group.vue | 4 ++-- packages/checkbox/src/checkbox.vue | 8 ++++---- test/unit/specs/checkbox.spec.js | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/checkbox/src/checkbox-group.vue b/packages/checkbox/src/checkbox-group.vue index c784ad7f..d40bef2d 100644 --- a/packages/checkbox/src/checkbox-group.vue +++ b/packages/checkbox/src/checkbox-group.vue @@ -10,8 +10,8 @@ props: { value: {}, - minimum: String, - maximum: String + min: Number, + max: Number }, watch: { diff --git a/packages/checkbox/src/checkbox.vue b/packages/checkbox/src/checkbox.vue index 2e6873f7..74ad9cdb 100644 --- a/packages/checkbox/src/checkbox.vue +++ b/packages/checkbox/src/checkbox.vue @@ -67,12 +67,12 @@ set(val) { if (this.isGroup) { let isLimitExceeded = false; - (this._checkboxGroup.minimum !== undefined && - val.length < this._checkboxGroup.minimum && + (this._checkboxGroup.min !== undefined && + val.length < this._checkboxGroup.min && (isLimitExceeded = true)); - (this._checkboxGroup.maximum !== undefined && - val.length > this._checkboxGroup.maximum && + (this._checkboxGroup.max !== undefined && + val.length > this._checkboxGroup.max && (isLimitExceeded = true)); isLimitExceeded === false && diff --git a/test/unit/specs/checkbox.spec.js b/test/unit/specs/checkbox.spec.js index cfeb472d..5035559b 100644 --- a/test/unit/specs/checkbox.spec.js +++ b/test/unit/specs/checkbox.spec.js @@ -73,8 +73,8 @@ describe('Checkbox', () => { template: `