import Vue from 'vue' import Cookies from 'js-cookie' import 'normalize.css/normalize.css' import Element from 'element-ui' // 列自适应宽度:https://github.com/legendJaden/AFTableColumn import AFTableColumn from 'af-table-column' // 可编辑grid插件 import 'xe-utils' import 'font-awesome/css/font-awesome.css' // vue中markdown编辑器 import mavonEditor from 'mavon-editor' import 'mavon-editor/dist/css/index.css' // 数据字典 import dict from './components/Dict' import scroll from 'vue-seamless-scroll' // 权限指令 import permission from './components/Permission' import './assets/styles/element-variables.scss' // global css import './assets/styles/index.scss' // 代码高亮 import VueHighlightJS from 'vue-highlightjs' import 'highlight.js/styles/atom-one-dark.css' import App from './App' import store from './store' import router from './router/routers' import './assets/icons' // icon import './router/index' // permission control import 'echarts-gl' import 'jquery' Vue.use(scroll) Vue.use(AFTableColumn) Vue.use(VueHighlightJS) Vue.use(mavonEditor) Vue.use(permission) Vue.use(dict) Vue.use(Element, { size: Cookies.get('size') || 'mini' // set element-ui default size }) Vue.config.productionTip = false new Vue({ el: '#app', router, store, render: h => h(App) }) // var time1 = new Date().format("yyyy-MM-dd hh:mm:ss"); // eslint-disable-next-line no-extend-native Date.prototype.format = function(fmt) { var o = { 'M+': this.getMonth() + 1, // 月份 'd+': this.getDate(), // 日 'h+': this.getHours(), // 小时 'm+': this.getMinutes(), // 分 's+': this.getSeconds(), // 秒 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度 'S': this.getMilliseconds() // 毫秒 } if (/(y+)/.test(fmt)) { fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length)) } for (var k in o) { if (new RegExp('(' + k + ')').test(fmt)) { fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length))) } } return fmt }