refactor(Home): 优化市场模板搜索功能
- 移除了搜索值为空时重置索引的逻辑 - 在点击搜索时重置当前参数数据,包括关键字和索引
This commit is contained in:
@@ -73,7 +73,6 @@ let loadDataSingle = false;
|
|||||||
*/
|
*/
|
||||||
watch(searchValue, (value) => {
|
watch(searchValue, (value) => {
|
||||||
!value && (keyword = '');
|
!value && (keyword = '');
|
||||||
searchParm.index = 1;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const getTableList = async () => {
|
const getTableList = async () => {
|
||||||
@@ -128,7 +127,9 @@ const getMarketInfo = async (item: string | number, title?: string) => {
|
|||||||
* @param keyword 搜索关键词
|
* @param keyword 搜索关键词
|
||||||
*/
|
*/
|
||||||
function fetchTemplate() {
|
function fetchTemplate() {
|
||||||
|
// 当点击搜索的时候, 重置当前的参数数据
|
||||||
keyword = searchValue.value;
|
keyword = searchValue.value;
|
||||||
|
searchParm.index = 1;
|
||||||
getMarketInfo(marketIndex.value);
|
getMarketInfo(marketIndex.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user