mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-15 15:30:49 +08:00
@@ -175,13 +175,17 @@ const search = () => {
|
|||||||
router.push({
|
router.push({
|
||||||
path: '/search',
|
path: '/search',
|
||||||
query: {
|
query: {
|
||||||
keyword: value
|
keyword: value,
|
||||||
|
type: store.state.searchType
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const selectSearchType = (key: number) => {
|
const selectSearchType = (key: number) => {
|
||||||
store.state.searchType = key;
|
store.state.searchType = key;
|
||||||
|
if (searchValue.value) {
|
||||||
|
search();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const searchTypeOptions = ref(SEARCH_TYPES);
|
const searchTypeOptions = ref(SEARCH_TYPES);
|
||||||
|
|||||||
@@ -104,6 +104,15 @@ watch(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => searchType.value,
|
||||||
|
() => {
|
||||||
|
if (store.state.searchValue) {
|
||||||
|
loadSearch(store.state.searchValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const dateFormat = (time: any) => useDateFormat(time, 'YYYY.MM.DD').value;
|
const dateFormat = (time: any) => useDateFormat(time, 'YYYY.MM.DD').value;
|
||||||
const loadSearch = async (keywords: any, type: any = null) => {
|
const loadSearch = async (keywords: any, type: any = null) => {
|
||||||
hotKeyword.value = keywords;
|
hotKeyword.value = keywords;
|
||||||
|
|||||||
Reference in New Issue
Block a user