diff options
| author | shpuld <shpuld@gmail.com> | 2017-02-18 22:55:16 +0200 |
|---|---|---|
| committer | shpuld <shpuld@gmail.com> | 2017-02-18 22:55:16 +0200 |
| commit | 7b6719b96d23fd07552fec7bd7716c3d634d9aff (patch) | |
| tree | 0f953b72d784e85d75270d487ff5ff7effc82bd8 | |
| parent | e6f91badfbab71ed8c924bd49a86715852886ff1 (diff) | |
@click on top nav makes window scroll to top
| -rw-r--r-- | src/App.js | 3 | ||||
| -rw-r--r-- | src/App.vue | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -24,6 +24,9 @@ export default { methods: { activatePanel (panelName) { this.mobileActivePanel = panelName + }, + scrollToTop () { + window.scrollTo(0, 0) } } } diff --git a/src/App.vue b/src/App.vue index d8e1d3e8..c4b3cb13 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,6 @@ <template> <div id="app" v-bind:style="style" class="base02-background"> - <nav class='container base01-background base04'> + <nav class='container base01-background base04' @click="scrollToTop()"> <div class='inner-nav' :style="logoStyle"> <div class='item'> <router-link :to="{ name: 'root'}">{{sitename}}</router-link> |
