From 7be0bd57510a56ab6b35ceca227e92f6fa5af7eb Mon Sep 17 00:00:00 2001 From: why Date: Tue, 16 Jul 2019 17:12:26 +0800 Subject: [PATCH] fix[complex-table]: form header sort icon is out of sync (#2382) --- src/views/table/complex-table.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/views/table/complex-table.vue b/src/views/table/complex-table.vue index 43b00e80..51ea42a1 100644 --- a/src/views/table/complex-table.vue +++ b/src/views/table/complex-table.vue @@ -35,7 +35,7 @@ style="width: 100%;" @sort-change="sortChange" > - + @@ -375,6 +375,14 @@ export default { return v[j] } })) + }, + getSortClass: function(key) { + const sort = this.listQuery.sort + return sort === `+${key}` + ? 'ascending' + : sort === `-${key}` + ? 'descending' + : '' } } }