feat: 优化搜索功能

This commit is contained in:
alger
2024-05-22 19:20:57 +08:00
parent 73982f0e84
commit a2af0f3904
6 changed files with 150 additions and 39 deletions
+9 -8
View File
@@ -95,15 +95,16 @@ const search = () => {
const { value } = searchValue;
if (value === '') {
searchValue.value = hotSearchValue.value;
} else {
router.push({
path: '/search',
query: {
keyword: value,
type: searchType.value,
},
});
return;
}
router.push({
path: '/search',
query: {
keyword: value,
type: searchType.value,
},
});
};
const selectSearchType = (key: number) => {