This commit is contained in:
syuilo 2018-06-10 12:21:44 +09:00
parent 15dcfe1627
commit 29fdd1de50

View File

@ -17,7 +17,11 @@ export default Vue.extend({
}, },
methods: { methods: {
onSubmit() { onSubmit() {
location.href = `/search?q=${encodeURIComponent(this.q)}`; if (this.q.startsWith('#')) {
this.$router.push(`/tags/${encodeURIComponent(this.q.substr(1))}`);
} else {
this.$router.push(`/search?q=${encodeURIComponent(this.q)}`);
}
} }
} }
}); });