Created
July 9, 2019 09:17
-
-
Save anoobbava/ebe295d460bce94909510a97290256e9 to your computer and use it in GitHub Desktop.
github Graphql vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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