From 16315a427696674eafab6b28da4fed4457dd1ca5 Mon Sep 17 00:00:00 2001 From: "@changcode" Date: Fri, 24 Jun 2022 09:25:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BB=AD=E8=B4=B9=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E4=BC=A0=E5=8F=82=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mixins/table.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/mixins/table.js b/src/mixins/table.js index 3643bcaa..62289e57 100644 --- a/src/mixins/table.js +++ b/src/mixins/table.js @@ -55,13 +55,20 @@ export default { }) }, tableDataSort (item) { - console.info(item) let orderBy = '' if (item.order === 'ascending') { - orderBy = chartTableOrderOptionsMapping[item.prop] || item.prop + if (item.prop === 'lastTime') { + orderBy = chartTableOrderOptionsMapping[item.prop] + } else { + orderBy = item.prop + } } if (item.order === 'descending') { - orderBy = '-' + chartTableOrderOptionsMapping[item.prop] || item.prop + if (item.prop === 'lastTime') { + orderBy = '-' + chartTableOrderOptionsMapping[item.prop] + } else { + orderBy = '-' + item.prop + } } this.$emit('orderBy', orderBy) }