mirror of https://github.com/ElemeFE/element
like as if (filterValue !== null) is better
parent
0b10d3e152
commit
cdb2335939
|
@ -93,7 +93,7 @@
|
||||||
handleSelect(filterValue) {
|
handleSelect(filterValue) {
|
||||||
this.filterValue = filterValue;
|
this.filterValue = filterValue;
|
||||||
|
|
||||||
if (typeof filterValue === 'number' && filterValue >= 0) {
|
if ((typeof filterValue !== 'undefined') && (filterValue !== null)) {
|
||||||
this.confirmFilter(this.filteredValue);
|
this.confirmFilter(this.filteredValue);
|
||||||
} else {
|
} else {
|
||||||
this.confirmFilter([]);
|
this.confirmFilter([]);
|
||||||
|
@ -129,7 +129,7 @@
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
if (this.filteredValue) {
|
if (this.filteredValue) {
|
||||||
if (typeof value === 'number' && value >= 0) {
|
if ((typeof value !== 'undefined') && (value !== null)) {
|
||||||
this.filteredValue.splice(0, 1, value);
|
this.filteredValue.splice(0, 1, value);
|
||||||
} else {
|
} else {
|
||||||
this.filteredValue.splice(0, 1);
|
this.filteredValue.splice(0, 1);
|
||||||
|
|
Loading…
Reference in New Issue