12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- import Vue from 'vue'
- import VueRouter from 'vue-router'
- import Cookies from 'js-cookie'
- import Element from 'element-ui'
- import './assets/styles/element/element-variables.scss'
- import '@/assets/styles/index.scss'
- import '@/utils/browser_patch'
- import App from './App'
- import store from './store'
- import router from './router'
- import { parseTime,judgmentNetworkReturnAddress,accAdd,accSub,accDiv,accMul } from "@/utils/index";
- //全屏组件
- import dataV from '@jiaminghi/data-view'
- import './assets/icons'
- import Pagination from "@/components/Pagination";
- // 引入echarts
- import * as echarts from 'echarts'
- import "echarts-gl";
- Vue.prototype.$echarts = echarts
- Vue.prototype.parseTime = parseTime
- Vue.prototype.judgmentNetworkReturnAddress = judgmentNetworkReturnAddress
- Vue.prototype.accAdd = accAdd
- Vue.prototype.accSub = accSub
- Vue.prototype.accDiv = accDiv
- Vue.prototype.accMul = accMul
- Vue.component('Pagination', Pagination)
- Vue.prototype.msgSuccess = function (msg) {
- this.$message({ showClose: true, message: msg, type: "success", offset:100 });
- }
- Vue.prototype.msgError = function (msg) {
- this.$message({ showClose: true, message: msg, type: "error", offset:100 });
- }
- Vue.prototype.msgInfo = function (msg) {
- this.$message.info(msg);
- }
- //全屏组件
- Vue.use(dataV)
- /**
- * If you don't want to use mock-server
- * you want to use MockJs for mock api
- * you can execute: mockXHR()
- *
- * Currently MockJs will be used in the production environment,
- * please remove it before going online! ! !
- */
- Vue.use(Element, {
- size: Cookies.get('size') || 'medium' // set element-ui default size
- })
- Vue.config.productionTip = false
- // 避免路由冗余导航
- const originalPush = VueRouter.prototype.push
- VueRouter.prototype.push = function push(location) {
- return originalPush.call(this, location).catch(err => err)
- }
- const originalReplace = VueRouter.prototype.replace
- VueRouter.prototype.replace = function replace(location) {
- return originalReplace.call(this, location).catch(err => err)
- }
- new Vue({
- el: '#app',
- router,
- store,
- render: h => h(App)
- })
|