From 2ef78bcd409547956088cfa259c05e3fe85b0da3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 10 Jun 2018 12:21:44 +0900 Subject: [PATCH] :pizza: --- .../app/desktop/views/components/ui.header.search.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/app/desktop/views/components/ui.header.search.vue b/src/client/app/desktop/views/components/ui.header.search.vue index 1ed28ba3a..b6149a187 100644 --- a/src/client/app/desktop/views/components/ui.header.search.vue +++ b/src/client/app/desktop/views/components/ui.header.search.vue @@ -17,7 +17,11 @@ export default Vue.extend({ }, methods: { 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)}`); + } } } });