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: { props: {
value: {}, value: {},
minimum: String, min: Number,
maximum: String max: Number
}, },
watch: { watch: {

View File

@ -67,12 +67,12 @@
set(val) { set(val) {
if (this.isGroup) { if (this.isGroup) {
let isLimitExceeded = false; let isLimitExceeded = false;
(this._checkboxGroup.minimum !== undefined && (this._checkboxGroup.min !== undefined &&
val.length < this._checkboxGroup.minimum && val.length < this._checkboxGroup.min &&
(isLimitExceeded = true)); (isLimitExceeded = true));
(this._checkboxGroup.maximum !== undefined && (this._checkboxGroup.max !== undefined &&
val.length > this._checkboxGroup.maximum && val.length > this._checkboxGroup.max &&
(isLimitExceeded = true)); (isLimitExceeded = true));
isLimitExceeded === false && isLimitExceeded === false &&

View File

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