fixed #2832
This commit is contained in:
parent
57fe55624e
commit
b34e09b8f9
3 changed files with 136 additions and 50 deletions
|
@ -23,7 +23,7 @@
|
|||
v-if="isPopperShow(column)"
|
||||
v-model="column._filterVisible"
|
||||
placement="bottom"
|
||||
@on-popper-hide="handleFilterHide(index)">
|
||||
@on-popper-hide="handleFilterHide(column._index)">
|
||||
<span :class="[prefixCls + '-filter']">
|
||||
<i class="ivu-icon ivu-icon-funnel" :class="{on: column._isFiltered}"></i>
|
||||
</span>
|
||||
|
@ -34,19 +34,19 @@
|
|||
</checkbox-group>
|
||||
</div>
|
||||
<div :class="[prefixCls + '-filter-footer']">
|
||||
<i-button type="text" size="small" :disabled="!column._filterChecked.length" @click.native="handleFilter(index)">{{ t('i.table.confirmFilter') }}</i-button>
|
||||
<i-button type="text" size="small" @click.native="handleReset(index)">{{ t('i.table.resetFilter') }}</i-button>
|
||||
<i-button type="text" size="small" :disabled="!column._filterChecked.length" @click.native="handleFilter(column._index)">{{ t('i.table.confirmFilter') }}</i-button>
|
||||
<i-button type="text" size="small" @click.native="handleReset(column._index)">{{ t('i.table.resetFilter') }}</i-button>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="content" :class="[prefixCls + '-filter-list']" v-else>
|
||||
<ul :class="[prefixCls + '-filter-list-single']">
|
||||
<li
|
||||
:class="itemAllClasses(column)"
|
||||
@click="handleReset(index)">{{ t('i.table.clearFilter') }}</li>
|
||||
@click="handleReset(column._index)">{{ t('i.table.clearFilter') }}</li>
|
||||
<li
|
||||
:class="itemClasses(column, item)"
|
||||
v-for="item in column.filters"
|
||||
@click="handleSelect(index, item.value)">{{ item.label }}</li>
|
||||
@click="handleSelect(column._index, item.value)">{{ item.label }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</Poptip>
|
||||
|
@ -133,10 +133,13 @@
|
|||
this.$parent.selectAll(status);
|
||||
},
|
||||
handleSort (index, type) {
|
||||
if (this.columns[index]._sortType === type) {
|
||||
const column = this.columns[index];
|
||||
const _index = column._index;
|
||||
|
||||
if (column._sortType === type) {
|
||||
type = 'normal';
|
||||
}
|
||||
this.$parent.handleSort(index, type);
|
||||
this.$parent.handleSort(_index, type);
|
||||
},
|
||||
handleSortByHead (index) {
|
||||
const column = this.columns[index];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue