liyangzheng 1 năm trước cách đây
mục cha
commit
62072da766
1 tập tin đã thay đổi với 5 bổ sung4 xóa
  1. 5 4
      src/views/search/index.vue

+ 5 - 4
src/views/search/index.vue

@@ -112,8 +112,8 @@ import file_audio from "@/assets/images/fileType/file_audio.png";
 import file_video from "@/assets/images/fileType/file_video.png";
 import file_zip from "@/assets/images/fileType/file_zip.png";
 //----------------------------------------
-const searchFor = ref("1"); //搜索范围
-const searchType = ref("doc"); //搜索对象
+const searchFor = ref(""); //搜索范围
+const searchType = ref("all"); //搜索对象
 const checkState = ref(false); //勾选框状态
 const activeNames = ref(["folder", "file"]);
 const isList = ref(true); //控制显示方式
@@ -191,8 +191,9 @@ const changeSort = async () => {
   const res = await flieSearch(query);
   baseData.value = res.rows;
   tableData.value = res.rows;
-  changeSearchFor(searchFor.value);
+  changeSearchFor('');
   // console.log("res", res);
+  console.log(searchFor.value,'search');
 };
 // 根据选项对数据处理,返回处理后的数据
 const fliterListData = (dataList) => {
@@ -332,7 +333,7 @@ onMounted(() => {
   baseData.value = searchData.rows;
   tableData.value = searchData.rows;
   total.value = searchData.total;
-  changeSearchFor(searchFor.value);
+  changeSearchFor('');
 });
 onBeforeRouteUpdate((to, from) => {
   console.log('to', to);