Commit 27a43e89 by amateur

优化

1 parent 5456a7d7
<template>
<div class="global-search">
<SearchLayout :history="true" @seach="handleSearch" />
</div>
<SearchLayout :history="true" @search="handleSearch" />
</template>
<script>
......@@ -15,14 +13,8 @@ export default {
},
methods: {
handleSearch (val) {
// this.$router.push({ name: '', query: { keyword: val } })
this.$router.push({ name: 'GlobalSearchResult', query: { keyword: val } })
}
}
}
</script>
<style lang="less" scoped>
.global-search {
height: 100%;
}
</style>
\ No newline at end of file
......@@ -5,12 +5,18 @@
</template>
<script>
import SearchLayout from './components/SearchLayout'
export default {
name: 'HomeSearchResult',
components: { SearchLayout },
data () {
return {
keyword: null
}
},
mounted () {
const { keyword } = this.$route.query
this.keyword = keyword
}
}
</script>
\ 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!