mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-18 11:37:31 +08:00
24 lines
591 B
Vue
24 lines
591 B
Vue
|
|
<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>
|