This commit is contained in:
algerkong
2021-07-26 17:47:15 +08:00
parent 68aedda1c2
commit be721628d0
8 changed files with 783 additions and 20 deletions
+23
View File
@@ -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>