瀏覽代碼

搜索显示不全问题

liuQiang 1 年之前
父節點
當前提交
1ec9a004d0
共有 2 個文件被更改,包括 16 次插入13 次删除
  1. 1 1
      src/layout/indexCommon.vue
  2. 15 12
      src/views/search/index.vue

+ 1 - 1
src/layout/indexCommon.vue

@@ -361,7 +361,7 @@ const toSearch = async () => {
     keyword: searchText.value,
     isAsc: "asc",
     orderByColumn: "createTime",
-    pageSize: 10,
+    pageSize: 20,
     pageNum: 1,
   };
   const res = await flieSearch(query);

+ 15 - 12
src/views/search/index.vue

@@ -156,7 +156,9 @@ const changeSearchFor = async(name) => {
   }
   let res = await flieSearch({
     keyword:searchText.value,
-    type:fileTypes
+    type:fileTypes,
+    pageSize: 20,
+    pageNum: 1,
   })
   console.log(res.rows,'filter');
   tableData.value = res.rows
@@ -316,7 +318,7 @@ async function handleScroll(e) {
       keyword: searchText.value,
       isAsc: "asc",
       orderByColumn: "createTime",
-      pageSize: 10,
+      pageSize: 20,
       pageNum: numnum,
     };
     const res = await flieSearch(query);
@@ -332,19 +334,20 @@ onMounted(() => {
   let searchData = parData.searchData;
   baseData.value = searchData.rows;
   tableData.value = searchData.rows;
+  console.log('tableData',tableData.value);
   total.value = searchData.total;
   changeSearchFor('');
 });
-onBeforeRouteUpdate((to, from) => {
-  console.log('to', to);
-  console.log('from', from);
-})
-watch(() => history, (newValue, oldValue) => {
-  console.log('history 发生改变了', newValue, oldValue);
-}, {
-  immediate: true,
-  deep: true
-});
+// onBeforeRouteUpdate((to, from) => {
+//   console.log('to', to);
+//   console.log('from', from);
+// })
+// watch(() => history, (newValue, oldValue) => {
+//   console.log('history 发生改变了', newValue, oldValue);
+// }, {
+//   immediate: true,
+//   deep: true
+// });
 </script>
 
 <style lang="scss" scoped>