You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
961 B
JavaScript

5 years ago
import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import Vuex from "vuex";
import moment from "moment";
import axios from "axios";
import QS from "qs";
import "./iview";
import "./vcharts";
import "lib-flexible/flexible";
import _ from "lodash";
6 years ago
Vue.prototype.$axios = axios;
Vue.prototype.$qs = QS;
Vue.prototype.$moment = moment;
5 years ago
Vue.config.productionTip = false;
Vue.prototype._ = _;
6 years ago
5 years ago
import echarts from "echarts";
import "echarts/map/js/china";
6 years ago
Vue.prototype.$echarts = echarts;
6 years ago
// 需要汉化
5 years ago
moment.locale("zh-cn");
6 years ago
Vue.use(Vuex);
// Vue.use(ViewUI);
6 years ago
//实现了全局的事件总线对象
Vue.prototype.bus = new Vue();
6 years ago
new Vue({
5 years ago
render: (h) => h(App),
6 years ago
router,
5 years ago
}).$mount("#app");
6 years ago
6 years ago
//重复点击同一个报错解决
5 years ago
import Router from "vue-router";
const routerPush = Router.prototype.push;
6 years ago
Router.prototype.push = function push(location) {
5 years ago
return routerPush.call(this, location).catch((error) => error);
};