import Vue from 'vue' import i18n from '@/locale'; import router from './router/index' import store from './store' import { sync } from 'vuex-router-sync' import App from 'components/app-root' import { FontAwesomeIcon } from './icons' import iView from 'iview'; import 'iview/dist/styles/iview.css'; import commons from "@/utils/public.js"; import apiTools from '@/api/api.js'; import { fetch, post } from '@/filters/http.js'; import VideoPlayer from 'vue-video-player'; //import jwtDecode from 'jwt-decode'; import animate from 'animate.css' require('video.js/dist/video-js.css'); require('vue-video-player/src/custom-theme.css'); Vue.use(VideoPlayer); //新添加的 import vuescroll from 'vue-scroll' import echarts from 'echarts' //全局API请求 Vue.prototype.$api = apiTools; Vue.prototype.$post = post; Vue.prototype.$get = fetch; //Vue.prototype.$jwtDecode = jwtDecode; Vue.use(vuescroll) Vue.use(animate) Vue.prototype.$echarts = echarts //ZXJ Vue.prototype.common = commons; // Registration of global components Vue.component('icon', FontAwesomeIcon); Vue.use(iView, { i18n: (key, value) => i18n.t(key, value) }) sync(store, router) const app = new Vue({ store, router, i18n, ...App }) export { app, router, store }