diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-10-27 23:42:09 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-10-27 23:42:09 +0900 |
| commit | c2ae160d2326ab2854224cb98811d8fb47e95231 (patch) | |
| tree | 2c7d0655958d6a920f31d6e575a9b0d9d43fe111 /src | |
| parent | 要らなさそう (diff) | |
| download | sharkey-c2ae160d2326ab2854224cb98811d8fb47e95231.tar.gz sharkey-c2ae160d2326ab2854224cb98811d8fb47e95231.tar.bz2 sharkey-c2ae160d2326ab2854224cb98811d8fb47e95231.zip | |
refactor
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/components/google.vue | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/client/components/google.vue b/src/client/components/google.vue index 6d8ae0b5bf..be724f038d 100644 --- a/src/client/components/google.vue +++ b/src/client/components/google.vue @@ -10,7 +10,12 @@ import { defineComponent } from 'vue'; import * as os from '@client/os'; export default defineComponent({ - props: ['q'], + props: { + q: { + type: String, + required: true, + } + }, data() { return { query: null, @@ -21,10 +26,7 @@ export default defineComponent({ }, methods: { search() { - const engine = this.$store.state.webSearchEngine || - 'https://www.google.com/search?q={{query}}'; - const url = engine.replace('{{query}}', this.query) - window.open(url, '_blank'); + window.open(`https://www.google.com/search?q=${this.query}`, '_blank'); } } }); |