Jelajahi Sumber

修复 分页重置数据

wangzhihui 4 tahun lalu
induk
melakukan
de49ccf420
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      src/views/voyage/voyageList.vue

+ 2 - 1
src/views/voyage/voyageList.vue

@@ -206,7 +206,6 @@ export default {
       if (res.data.status == 0) {
         tableData.value = res.data.result;
       } else {
-        tableData.value = [];
         ElNotification({
           type: "error",
           title: res.data.msg,
@@ -214,7 +213,9 @@ export default {
       }
     }
     function changeVoyageType(s) {
+      tableData.value = [];
       term.value = "";
+      currentPage.value = 1;
       currentbtn.value = s == 1;
       status.value = s;
       getVoyageList();