main.js
921 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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();
});