{"size": 1038, "ext": "js", "max_stars_repo_path": "src/main.js", "max_stars_repo_name": "mt-fe-team/web-insight", "max_stars_repo_stars_event_min_datetime": "2018-02-08T08:07:51.000Z", "max_stars_repo_stars_event_max_datetime": "2018-02-08T08:07:51.000Z", "max_issues_repo_path": "src/main.js", "max_issues_repo_name": "mt-fe-team/web-insight", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/main.js", "max_forks_repo_name": "mt-fe-team/web-insight", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.3170731707, "max_line_length": 110, "alphanum_fraction": 0.6888246628}
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import iView from 'iview'
import App from './App'
import router from './router'
import store from './store'
import { sync } from 'vuex-router-sync'
import 'iview/dist/styles/iview.css'

import filters from '@/plugins/filters'
import types from '@/plugins/types'

Vue.config.productionTip = false

// 注册iView的组件为全局组件
Vue.use(iView)
// 注册过滤器
Vue.use(filters)
// Action Types 都挂载到Vue原型上，获取：this.$$types.SIDEBAR_OPEN
Vue.use(types)
// 同步路由信息到store
sync(store, router)

/* eslint-disable no-new */
new Vue({
  el: '#app',
  store,
  router,
  template: '<App/>',
  components: { App },
  mounted () {
    // 监听ESC键退出全屏事件
    ['fullscreenchange', 'mozfullscreenchange', 'webkitfullscreenchange', 'msfullscreenchange'].forEach(v => {
      document.addEventListener(v, () => {
        this.$store.commit(this.$$types.TOGGLE_FULL_SCREEN, { changeState: true })
      })
    })
  }
})
