From 51fe114f34c67d0e2bb15d62707b7aff2c52f5c7 Mon Sep 17 00:00:00 2001 From: zhangdahai112 Date: Sun, 24 Jul 2022 13:10:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(UI=20=E8=87=AA=E5=8A=A8=E5=8C=96):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=AC=E5=85=B1=E7=9A=84=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E6=B2=A1=E6=9C=89=E6=B8=85=E7=A9=BA=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E6=9D=A1=E4=BB=B6=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1015132 --user=张大海 【UI测试】测试报告-按创建人升序/降序排列-取消升序/降序排列后列表数据未恢复为默认排序 https://www.tapd.cn/55049933/s/1208434 --- frontend/src/common/js/tableUtils.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/common/js/tableUtils.js b/frontend/src/common/js/tableUtils.js index 27d8079432..ada0fdc288 100644 --- a/frontend/src/common/js/tableUtils.js +++ b/frontend/src/common/js/tableUtils.js @@ -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;