You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
892 B
36 lines
892 B
import Vue from 'vue'
|
|
import 'normalize.css/normalize.css' // a modern alternative to CSS resets
|
|
import Element from 'element-ui'
|
|
import ElementPersonal from '@ele'
|
|
import '@/asset/style/index.scss' // global css
|
|
import App from '@/App'
|
|
import store from '@/store'
|
|
import router from '@/router'
|
|
import '@/asset/icon'
|
|
import '@/util/errorLog'
|
|
import '@/directive'
|
|
import filters from './filter'
|
|
import globalMethod from '@/globalMethod'
|
|
|
|
Vue.use(Element)
|
|
Vue.use(ElementPersonal)
|
|
Vue.use(filters)
|
|
Vue.use(globalMethod)
|
|
|
|
Vue.config.productionTip = false
|
|
|
|
new Vue({
|
|
el: '#app',
|
|
router,
|
|
store,
|
|
render: h => h(App)
|
|
})
|
|
|
|
//页面刷新时socket重连
|
|
store.dispatch('socket/init', store.state.user).catch()
|
|
|
|
window.addEventListener('unhandledrejection', event => {
|
|
if (event.reason.stack.startsWith('Error: Redirected when going from')) {
|
|
event.preventDefault()
|
|
}
|
|
})
|
|
|