mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-05 05:29:29 +08:00
fix(UI 自动化): 修复公共的排序方法没有清空排序条件的问题
--bug=1015132 --user=张大海 【UI测试】测试报告-按创建人升序/降序排列-取消升序/降序排列后列表数据未恢复为默认排序 https://www.tapd.cn/55049933/s/1208434
This commit is contained in:
parent
de0adca302
commit
2f3fde941d
@ -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
Block a user