From 6b6eff08baa3d052b66fd2e68f1ac0d8495f6f8a Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 29 八月 2024 17:35:33 +0800
Subject: [PATCH] 修改历史数据获取逻辑

---
 src/components/monitor/DataTable.vue |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/components/monitor/DataTable.vue b/src/components/monitor/DataTable.vue
index 29619e0..217aeb9 100644
--- a/src/components/monitor/DataTable.vue
+++ b/src/components/monitor/DataTable.vue
@@ -17,6 +17,7 @@
         :show-summary="false"
         :highlight-current-row="true"
         @row-click="handleRowClick"
+        @sort-change="handleSort"
       >
         <el-table-column
           :fixed="true"
@@ -25,6 +26,7 @@
           :formatter="timeFormatter"
           align="center"
           width="66"
+          sortable="custom"
         >
         </el-table-column>
         <template v-for="item in tableColumn" :key="item.name">
@@ -33,7 +35,8 @@
             :prop="item.name"
             :label="item.label"
             align="center"
-            width="64"
+            width="79"
+            sortable="custom"
           />
         </template>
       </el-table>
@@ -162,6 +165,11 @@
       // console.log(row);
       // console.log(col);
       // console.log(event.target.getBoundingClientRect().height);
+    },
+    handleSort({ column, prop, order }) {
+      console.log(column);
+      console.log(prop);
+      console.log(order);
     }
   }
 };

--
Gitblit v1.9.3