+
-
+
{{ item.label }}
- {{ t('i.table.confirmFilter') }}
- {{ t('i.table.resetFilter') }}
+ {{ t('i.table.confirmFilter') }}
+ {{ t('i.table.resetFilter') }}
- {{ t('i.table.clearFilter') }}
+ :class="itemAllClasses(getColumn(rowIndex, index))"
+ @click="handleReset(getColumn(rowIndex, index)._index)">{{ t('i.table.clearFilter') }}
- {{ item.label }}
+ @click="handleSelect(getColumn(rowIndex, index)._index, item.value)">{{ item.label }}
@@ -186,6 +186,11 @@
},
handleFilterHide (index) {
this.$parent.handleFilterHide(index);
+ },
+ // 因为表头嵌套不是深拷贝,所以没有 _ 开头的方法,在 isGroup 下用此列
+ getColumn (rowIndex, index) {
+ const isGroup = this.columnRows.length > 1;
+ return isGroup ? this.columns[rowIndex] : this.headRows[rowIndex][index];
}
}
};