mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-18 11:37:31 +08:00
搜索
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<div>{{ searchDetail }}</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>import { getSearch } from "@/api/search";
|
||||
import { onMounted } from "@vue/runtime-core";
|
||||
import { useRoute } from "vue-router";
|
||||
import type { ISearchDetail } from "@/type/search"
|
||||
import { ref } from "vue";
|
||||
const route = useRoute();
|
||||
const keyword = route.query.keyword;
|
||||
const searchDetail = ref<ISearchDetail>()
|
||||
const loadSearch = async () => {
|
||||
const { data } = await getSearch(keyword);
|
||||
searchDetail.value = data;
|
||||
}
|
||||
onMounted(() => {
|
||||
loadSearch()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
Reference in New Issue
Block a user