mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-12-03 12:48:45 +08:00
Rename minimum/maximum to min/max, type to Number
This commit is contained in:
parent
87f9c5f580
commit
dfddd5d857
@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
props: {
|
props: {
|
||||||
value: {},
|
value: {},
|
||||||
minimum: String,
|
min: Number,
|
||||||
maximum: String
|
max: Number
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -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 &&
|
||||||
|
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user