Skip to content
Snippets Groups Projects
Commit f06ded94 authored by syuilo's avatar syuilo
Browse files

refactor(client): use composition api

parent 1b867cc1
No related branches found
No related tags found
No related merge requests found
...@@ -5,31 +5,18 @@ ...@@ -5,31 +5,18 @@
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts" setup>
import { defineComponent } from 'vue'; import { ref } from 'vue';
import * as os from '@/os';
export default defineComponent({ const props = defineProps<{
props: { q: string;
q: { }>();
type: String,
required: true, const query = ref(props.q);
}
}, const search = () => {
data() { window.open(`https://www.google.com/search?q=${query.value}`, '_blank');
return { };
query: null,
};
},
mounted() {
this.query = this.q;
},
methods: {
search() {
window.open(`https://www.google.com/search?q=${this.query}`, '_blank');
}
}
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment