refactor(Home): 优化市场调研模板搜索功能
- 引入 useSurveySearch 钩子以支持调查模板搜索 - 在搜索值变化时重置索引到 1
This commit is contained in:
@@ -52,6 +52,7 @@ import { getListScene, getSurveyTemplates } from '@/api/home';
|
|||||||
import Search from '@/components/Search/Index.vue';
|
import Search from '@/components/Search/Index.vue';
|
||||||
import { imgMap } from '@/utils/imgMap';
|
import { imgMap } from '@/utils/imgMap';
|
||||||
import { throttle } from '@/utils/utils';
|
import { throttle } from '@/utils/utils';
|
||||||
|
import { index } from '@/views/HomeSearch/Hooks/useSurveySearch';
|
||||||
|
|
||||||
const searchParm = {
|
const searchParm = {
|
||||||
index: 1
|
index: 1
|
||||||
@@ -72,7 +73,7 @@ let loadDataSingle = false;
|
|||||||
*/
|
*/
|
||||||
watch(searchValue, (value) => {
|
watch(searchValue, (value) => {
|
||||||
!value && (keyword = '');
|
!value && (keyword = '');
|
||||||
getMarketInfo(active.value);
|
searchParm.index = 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
const getTableList = async () => {
|
const getTableList = async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user