main.js 921 字节
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import 'babel-polyfill'
import filters from "./filters";
import seconds from './seconds';
import store from './store';
import Video from 'video.js'
import videojs from "video.js";
import "videojs-contrib-hls";
import 'video.js/dist/video-js.css';
import axios from 'axios';
import lrz from 'lrz'
Vue.prototype.$video = Video;
for (var key in filters) {
    Vue.filter(key, filters[key]);
}
for (var key in seconds) {
    Vue.filter(key, seconds[key]);
}


Vue.config.productionTip = false
Vue.use(ElementUI)
new Vue({
        el: '#app',
        router,
        store,
        render: h => h(App)
    })
    // 全局路由守卫


router.beforeEach((to, from, next) => {
    document.body.scrollTop = 0;
    document.documentElement.scrollTop = 0;
    next();
});