summaryrefslogtreecommitdiff
path: root/packages/client/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'packages/client/src/components')
-rw-r--r--packages/client/src/components/google.vue35
1 files changed, 11 insertions, 24 deletions
diff --git a/packages/client/src/components/google.vue b/packages/client/src/components/google.vue
index a39168b80f..210ca72bfe 100644
--- a/packages/client/src/components/google.vue
+++ b/packages/client/src/components/google.vue
@@ -5,31 +5,18 @@
</div>
</template>
-<script lang="ts">
-import { defineComponent } from 'vue';
-import * as os from '@/os';
+<script lang="ts" setup>
+import { ref } from 'vue';
-export default defineComponent({
- props: {
- q: {
- type: String,
- required: true,
- }
- },
- data() {
- return {
- query: null,
- };
- },
- mounted() {
- this.query = this.q;
- },
- methods: {
- search() {
- window.open(`https://www.google.com/search?q=${this.query}`, '_blank');
- }
- }
-});
+const props = defineProps<{
+ q: string;
+}>();
+
+const query = ref(props.q);
+
+const search = () => {
+ window.open(`https://www.google.com/search?q=${query.value}`, '_blank');
+};
</script>
<style lang="scss" scoped>