fix: search issues

This commit is contained in:
qier222 2021-01-31 17:36:00 +08:00
parent 0ef108df4c
commit 86452f0420
6 changed files with 44 additions and 56 deletions

View file

@ -7,7 +7,7 @@
</h1>
<div v-if="type === 'artists'">
<CoverRow type="artist" :items="result" columnNumber="6" />
<CoverRow type="artist" :items="result" :columnNumber="6" />
</div>
<div v-if="type === 'albums'">
<CoverRow
@ -63,7 +63,7 @@ export default {
},
computed: {
keywords() {
return this.$store.state.search.keywords;
return this.$route.params.keywords;
},
type() {
return camelCase(this.$route.params.type);
@ -131,12 +131,6 @@ export default {
},
},
created() {
if (this.keywords.length === 0) {
this.$store.commit("updateSearch", {
key: "keywords",
value: this.$route.params.keywords,
});
}
this.fetchData();
},
};