Rename minimum/maximum to min/max, type to Number

This commit is contained in:
Mathieu DARTIGUES 2017-03-23 09:01:48 +01:00 committed by 杨奕
parent 87f9c5f580
commit dfddd5d857
3 changed files with 8 additions and 8 deletions

View File

@ -10,8 +10,8 @@
props: {
value: {},
minimum: String,
maximum: String
min: Number,
max: Number
},
watch: {

View File

@ -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 &&

View File

@ -73,8 +73,8 @@ describe('Checkbox', () => {
template: `
<el-checkbox-group
v-model="checkList"
minimum="1"
maximum="2"
:min="1"
:max="2"
>
<el-checkbox label="a" ref="a"></el-checkbox>
<el-checkbox label="b" ref="b"></el-checkbox>