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

- 移除了搜索值为空时重置索引的逻辑
- 在点击搜索时重置当前参数数据,包括关键字和索引
This commit is contained in:
Huangzhe
2025-05-28 18:26:28 +08:00
parent 7c5b9e460a
commit fedfab75be

View File

@@ -73,7 +73,6 @@ let loadDataSingle = false;
*/
watch(searchValue, (value) => {
!value && (keyword = '');
searchParm.index = 1;
});
const getTableList = async () => {
@@ -128,7 +127,9 @@ const getMarketInfo = async (item: string | number, title?: string) => {
* @param keyword 搜索关键词
*/
function fetchTemplate() {
// 当点击搜索的时候, 重置当前的参数数据
keyword = searchValue.value;
searchParm.index = 1;
getMarketInfo(marketIndex.value);
}