1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- import router from "./router";
- import 'normalize.css/normalize.css' // a modern alternative to CSS resets
- import 'element-ui/lib/theme-chalk/display.css';
- import Viewer from 'v-viewer';
- import {
- getToken, removeMenu,
- removeBtn, removeToken
- } from '@/utils/auth'
- import ElementUI from 'element-ui'
- import 'viewerjs/dist/viewer.css'
- import "element-ui/lib/theme-chalk/display.css";
- import "./styles/element-variables.scss";
- import './styles/index.scss' // global css
- import globalComponents from './components/globalComponents'
- import App from './App'
- import store from './store'
- import base from './assets/utils/prototype/index'
- import dataV from '@jiaminghi/data-view';
- // 按需引入vue-awesome图标
- import Icon from 'vue-awesome/components/Icon';
- import 'vue-awesome/icons/chart-bar.js';
- import 'vue-awesome/icons/chart-area.js';
- import 'vue-awesome/icons/chart-pie.js';
- import 'vue-awesome/icons/chart-line.js';
- import 'vue-awesome/icons/align-left.js';
- import echarts from 'echarts'
- import * as filters from './filters' // global filters
- Vue.component('icon', Icon);
- Vue.use(dataV);
- Vue.prototype.$echarts = echarts
- Array.prototype.remove = function (val) {
- var index = this.indexOf(val);
- if (index > -1) {
- this.splice(index, 1);
- }
- };
- // 兼容
- if (typeof String.prototype.startsWith != "function") {
- String.prototype.startsWith = function (prefix) {
- return this.slice(0, prefix.length) === prefix;
- };
- }
- Vue.use(globalComponents)
- Vue.use(Viewer, {
- defaultOptions: {
- zIndex: 9999
- }
- })
- Vue.use(base)
- import PuzzleVerification from 'vue-puzzle-verification'
- Vue.use(PuzzleVerification)
- // register global utility filters
- Object.keys(filters).forEach(key => {
- Vue.filter(key, filters[key])
- })
- Vue.config.productionTip = false
- Vue.use(ElementUI)
- window.vm = new Vue({
- router,
- store,
- render: h => h(App)
- }).$mount("#app");
- if (getToken() === null || getToken() === undefined || getToken() === '') {
- removeMenu()
- removeBtn()
- removeToken()
- router.replace({ name: 'login' });
- }
|