Browse Source

feat(组件): 修改分页

tangning 2 năm trước cách đây
mục cha
commit
0b26594491
1 tập tin đã thay đổi với 9 bổ sung6 xóa
  1. 9 6
      src/views/dashboard/analysis/index.vue

+ 9 - 6
src/views/dashboard/analysis/index.vue

@@ -105,7 +105,7 @@
       customRender: ({ record }) => {
         const { userName } = record;
         let reg = /(\d{3})\d{4}(\d{4})/;
-        const macthUserName = userName.replace(reg, '$1****$2');
+        const macthUserName = userName && userName.replace(reg, '$1****$2');
         return macthUserName;
       },
     },
@@ -223,8 +223,8 @@
 
   const searchInfo = ref({
     liveRoomId: '',
-    limit: 20,
-    page: 1,
+    // limit: 20,
+    // page: 1,
     time: [priorDate, today],
   });
 
@@ -239,7 +239,10 @@
       console.log('beforeFetch', data);
       data.time = data.time.map((item) => formatToDate(item));
       handleStatic(data);
-      searchInfo.value = data;
+      searchInfo.value = {
+        liveRoomId: data.liveRoomId,
+        time: data.time,
+      };
       return data;
     },
     afterFetch: function (data) {
@@ -295,8 +298,8 @@
   async function handleReset() {
     searchInfo.value = {
       liveRoomId: '',
-      limit: 20,
-      page: 1,
+      // limit: 20,
+      // page: 1,
       time: [priorDate, today],
     };
   }