mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-30 12:07:22 +08:00
🌈 style: 优化类型
This commit is contained in:
@@ -23,7 +23,7 @@ const selectRecommendItem = async (item: IRecommendItem) => {
|
||||
const route = useRoute();
|
||||
const listTitle = ref(route.query.type || '歌单列表');
|
||||
|
||||
const loadList = async (type: any) => {
|
||||
const loadList = async (type: string) => {
|
||||
const params = {
|
||||
cat: type || '',
|
||||
limit: 30,
|
||||
@@ -34,7 +34,7 @@ const loadList = async (type: any) => {
|
||||
};
|
||||
|
||||
if (route.query.type) {
|
||||
loadList(route.query.type);
|
||||
loadList(route.query.type as string);
|
||||
} else {
|
||||
getRecommendList().then((res: { data: { result: any } }) => {
|
||||
recommendList.value = res.data.result;
|
||||
@@ -45,7 +45,7 @@ watch(
|
||||
() => route.query,
|
||||
async (newParams) => {
|
||||
if (newParams.type) {
|
||||
loadList(newParams.type);
|
||||
loadList(newParams.type as string);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user