mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-12-02 12:18:46 +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: {
|
||||
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>
|
||||
|
Loading…
Reference in New Issue
Block a user