refactor(Home): 优化市场调研模板搜索功能

- 引入 useSurveySearch 钩子以支持调查模板搜索
- 在搜索值变化时重置索引到 1
This commit is contained in:
Huangzhe
2025-05-28 18:22:08 +08:00
parent 3fa7b6e2e1
commit 7c5b9e460a

View File

@@ -52,6 +52,7 @@ import { getListScene, getSurveyTemplates } from '@/api/home';
import Search from '@/components/Search/Index.vue';
import { imgMap } from '@/utils/imgMap';
import { throttle } from '@/utils/utils';
import { index } from '@/views/HomeSearch/Hooks/useSurveySearch';
const searchParm = {
index: 1
@@ -72,7 +73,7 @@ let loadDataSingle = false;
*/
watch(searchValue, (value) => {
!value && (keyword = '');
getMarketInfo(active.value);
searchParm.index = 1;
});
const getTableList = async () => {