Skip to content

Instantly share code, notes, and snippets.

@anoobbava
Created July 9, 2019 09:17
Show Gist options
  • Select an option

  • Save anoobbava/ebe295d460bce94909510a97290256e9 to your computer and use it in GitHub Desktop.

Select an option

Save anoobbava/ebe295d460bce94909510a97290256e9 to your computer and use it in GitHub Desktop.
github Graphql vue
path: src/components/toolBar.vue
<template>
<v-toolbar dark color="primary">
<v-toolbar-title class="white--text">
<v-btn @click="redirectToHome" icon>
<v-icon medium>home</v-icon>
</v-btn>GitHub Graphql
</v-toolbar-title>
<v-spacer></v-spacer>
<v-text-field
placeholder="please enter the Github Repo name"
v-model="searchLanguage"
></v-text-field>
<v-btn @click="searchForData" icon>
<v-icon>search</v-icon>
</v-btn>
<v-btn icon>
<v-icon>refresh</v-icon>
</v-btn>
</v-toolbar>
</template>
<script>
export default {
data () {
return {
searchLanguage: ''
}
},
methods: {
redirectToHome () {
this.$router.push('/')
},
searchForData () {
this.$router.push('/search/' + this.searchLanguage)
this.searchLanguage = ''
}
}
}
</script>
<style>
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment