Commit 27a43e89 by amateur

优化

1 parent 5456a7d7
<template> <template>
<div class="global-search"> <SearchLayout :history="true" @search="handleSearch" />
<SearchLayout :history="true" @seach="handleSearch" />
</div>
</template> </template>
<script> <script>
...@@ -15,14 +13,8 @@ export default { ...@@ -15,14 +13,8 @@ export default {
}, },
methods: { methods: {
handleSearch (val) { handleSearch (val) {
// this.$router.push({ name: '', query: { keyword: val } }) this.$router.push({ name: 'GlobalSearchResult', query: { keyword: val } })
} }
} }
} }
</script> </script>
<style lang="less" scoped>
.global-search {
height: 100%;
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -5,12 +5,18 @@ ...@@ -5,12 +5,18 @@
</template> </template>
<script> <script>
import SearchLayout from './components/SearchLayout'
export default { export default {
name: 'HomeSearchResult', name: 'HomeSearchResult',
components: { SearchLayout },
data () { data () {
return { return {
keyword: null keyword: null
} }
},
mounted () {
const { keyword } = this.$route.query
this.keyword = keyword
} }
} }
</script> </script>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!