Skip to content

Instantly share code, notes, and snippets.

@johnleider
Created February 26, 2020 14:55
Show Gist options
  • Select an option

  • Save johnleider/debe0af2329a5b003ae28f20a9c33a6a to your computer and use it in GitHub Desktop.

Select an option

Save johnleider/debe0af2329a5b003ae28f20a9c33a6a to your computer and use it in GitHub Desktop.

Revisions

  1. johnleider created this gist Feb 26, 2020.
    21 changes: 21 additions & 0 deletions Playground.vue
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    <template>
    <v-app-bar
    :color="color"
    @scroll="onScroll"
    >
    </v-app-bar>
    </template>

    <script>
    export default {
    data: () => ({
    color: 'blue',
    }),
    methods: {
    onScroll (scroll) {
    this.color = scroll > 10 ? 'red' : 'blue'
    },
    },
    }
    </script>