<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
import {
  mapGetters
} from 'vuex'
import './assets/css/common.less'
export default {
  name: 'App',
  computed: {
    ...mapGetters([
      'name'
    ])
  },
  watch: {
    $route(to, from) {
      const locationHash = window.location.hash

      this.$matomo.setCustomUrl(locationHash.replace(/#/g, ''))
      this.$matomo.trackPageView(to.meta.title) // 设置页面名称
    }
  }
}
</script>
