Commit dfddd5d8 authored by Mathieu DARTIGUES's avatar Mathieu DARTIGUES Committed by 杨奕

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

parent 87f9c5f5
......@@ -10,8 +10,8 @@
props: {
value: {},
minimum: String,
maximum: String
min: Number,
max: Number
},
watch: {
......
......@@ -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 &&
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment