fix(UI 自动化): 修复公共的排序方法没有清空排序条件的问题
--bug=1015132 --user=张大海 【UI测试】测试报告-按创建人升序/降序排列-取消升序/降序排列后列表数据未恢复为默认排序 https://www.tapd.cn/55049933/s/1208434
This commit is contained in:
parent
5339932369
commit
51fe114f34
|
@ -5,6 +5,7 @@ import i18n from "@/i18n/i18n";
|
|||
import Sortable from 'sortablejs'
|
||||
import {timestampFormatDate} from "@/common/js/filter";
|
||||
import {CUSTOM_FIELD_TYPE_OPTION} from "@/common/js/table-constants";
|
||||
import _ from "lodash"
|
||||
|
||||
export function _handleSelectAll(component, selection, tableData, selectRows, condition) {
|
||||
if (selection.length > 0) {
|
||||
|
@ -148,6 +149,12 @@ export function _sort(column, condition) {
|
|||
condition.orders = [];
|
||||
}
|
||||
if (column.order == null) {
|
||||
if (condition.orders && condition.orders.length) {
|
||||
let index = _.findIndex(condition.orders, {"name": column.column.columnKey});
|
||||
if (index != -1) {
|
||||
condition.orders.splice(index, 1);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
let hasProp = false;
|
||||
|
|
Loading…
Reference in New Issue