forked from FoundKeyGang/FoundKey
client: search button is a no-op
Don't be evil. reference: FoundKeyGang/FoundKey#2 (comment)
This commit is contained in:
parent
40d9aa6219
commit
9abbe94108
2 changed files with 5 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="mk-google">
|
<div class="mk-search">
|
||||||
<input v-model="query" type="search" :placeholder="q">
|
<input v-model="query" type="search" :placeholder="q">
|
||||||
<button @click="search"><i class="fas fa-search"></i> {{ $ts.search }}</button>
|
<button><i class="fas fa-search"></i> {{ $ts.search }}</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -13,14 +13,10 @@ const props = defineProps<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const query = ref(props.q);
|
const query = ref(props.q);
|
||||||
|
|
||||||
const search = () => {
|
|
||||||
window.open(`https://www.google.com/search?q=${query.value}`, '_blank');
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.mk-google {
|
.mk-search {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: 8px 0;
|
margin: 8px 0;
|
||||||
|
|
|
@ -7,7 +7,7 @@ import MkEmoji from '@/components/global/emoji.vue';
|
||||||
import { concat } from '@/scripts/array';
|
import { concat } from '@/scripts/array';
|
||||||
import MkFormula from '@/components/formula.vue';
|
import MkFormula from '@/components/formula.vue';
|
||||||
import MkCode from '@/components/code.vue';
|
import MkCode from '@/components/code.vue';
|
||||||
import MkGoogle from '@/components/google.vue';
|
import MkSearch from '@/components/mfm-search.vue';
|
||||||
import MkSparkle from '@/components/sparkle.vue';
|
import MkSparkle from '@/components/sparkle.vue';
|
||||||
import MkA from '@/components/global/a.vue';
|
import MkA from '@/components/global/a.vue';
|
||||||
import { host } from '@/config';
|
import { host } from '@/config';
|
||||||
|
@ -306,7 +306,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'search': {
|
case 'search': {
|
||||||
return [h(MkGoogle, {
|
return [h(MkSearch, {
|
||||||
key: Math.random(),
|
key: Math.random(),
|
||||||
q: token.props.query,
|
q: token.props.query,
|
||||||
})];
|
})];
|
||||||
|
|
Loading…
Reference in a new issue