Commit 73ae27d88b00596e023ca310033b3811f8bd03a5

Authored by 梁灏
1 parent 91bda66d

update Table filterRemote format

Showing 1 changed file with 5 additions and 5 deletions   Show diff stats
src/components/table/table.vue
@@ -496,9 +496,9 @@ @@ -496,9 +496,9 @@
496 }, 496 },
497 filterData (data, column) { 497 filterData (data, column) {
498 return data.filter((row) => { 498 return data.filter((row) => {
499 - if(typeof column.filterRemote == 'function'){ //如果定义了远程过滤方法则忽略此方法  
500 - return true;  
501 - } 499 + //如果定义了远程过滤方法则忽略此方法
  500 + if (typeof column.filterRemote === 'function') return;
  501 +
502 let status = !column._filterChecked.length; 502 let status = !column._filterChecked.length;
503 for (let i = 0; i < column._filterChecked.length; i++) { 503 for (let i = 0; i < column._filterChecked.length; i++) {
504 status = column.filterMethod(column._filterChecked[i], row); 504 status = column.filterMethod(column._filterChecked[i], row);
@@ -509,8 +509,8 @@ @@ -509,8 +509,8 @@
509 }, 509 },
510 filterOtherData (data, index) { 510 filterOtherData (data, index) {
511 let column = this.cloneColumns[index]; 511 let column = this.cloneColumns[index];
512 - if(typeof column.filterRemote == 'function'){  
513 - column.filterRemote.call(this.$parent,column._filterChecked,column.key,column); 512 + if (typeof column.filterRemote === 'function') {
  513 + column.filterRemote.call(this.$parent, column._filterChecked, column.key, column);
514 } 514 }
515 515
516 this.cloneColumns.forEach((col, colIndex) => { 516 this.cloneColumns.forEach((col, colIndex) => {