From 73ae27d88b00596e023ca310033b3811f8bd03a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=81=8F?= Date: Sat, 22 Apr 2017 14:18:07 +0800 Subject: [PATCH] update Table filterRemote format --- src/components/table/table.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/table/table.vue b/src/components/table/table.vue index 5bdd449c..e2d56e63 100644 --- a/src/components/table/table.vue +++ b/src/components/table/table.vue @@ -496,9 +496,9 @@ }, filterData (data, column) { return data.filter((row) => { - if(typeof column.filterRemote == 'function'){ //如果定义了远程过滤方法则忽略此方法 - return true; - } + //如果定义了远程过滤方法则忽略此方法 + if (typeof column.filterRemote === 'function') return; + let status = !column._filterChecked.length; for (let i = 0; i < column._filterChecked.length; i++) { status = column.filterMethod(column._filterChecked[i], row); @@ -509,8 +509,8 @@ }, filterOtherData (data, index) { let column = this.cloneColumns[index]; - if(typeof column.filterRemote == 'function'){ - column.filterRemote.call(this.$parent,column._filterChecked,column.key,column); + if (typeof column.filterRemote === 'function') { + column.filterRemote.call(this.$parent, column._filterChecked, column.key, column); } this.cloneColumns.forEach((col, colIndex) => {