import Vue from 'vue' import App from './App.vue' import router from './router' import ElementUI from 'element-ui'; import {base} from '@/configue/base' import 'element-ui/lib/theme-chalk/index.css'; import {axios, serverName} from './configue/http' import '../theme/index.css' import {isImage,isTypeBySend} from "@/util/index.js"; //全局过滤器 import * as filters from '@/filters/index.js' Object.keys(filters).forEach(key=>{ Vue.filter(key,filters[key])//插入过滤器名和对应方法 }) //弹框 import layer from 'vue-layer' import 'vue-layer/lib/vue-layer.css'; Vue.prototype.$layer = layer(Vue); //富文本 import VueQuillEditor from 'vue-quill-editor' // require styles import 'quill/dist/quill.core.css' import 'quill/dist/quill.snow.css' import 'quill/dist/quill.bubble.css' Vue.use(VueQuillEditor, /* { default global options } */) Vue.use(ElementUI) Vue.config.productionTip = false Vue.prototype.$base = base Vue.prototype.$bus = new Vue() Vue.prototype.$http = axios Vue.prototype.isImage = isImage Vue.prototype.isTypeBySend = isTypeBySend Vue.prototype.OSSURL = "https://oss-xiaoan.oss-cn-shenzhen.aliyuncs.com/" Vue.prototype.MAXLENGTH = 200 Vue.prototype.FONTLENGTH = 25 Vue.prototype.PAGESIZES = [25,50,75,100] Vue.prototype.loading = { close(){ } } Vue.prototype.loadOption = { lock: true, text: '上传中', spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.7)' } Vue.prototype.statusStr = { 1: "草稿中", 2: "待审核", 3: "审核不通过", 4: "审核通过" }; let tmpYear = [] for (let i = 2000; i <= 2050; i++) { tmpYear.push({ id:i, name:i+'年' }) } Vue.prototype.yearStr = [ { id:1001, name:'革命战争时期' }, { id:1002, name:'和平建设时期' }, { id:1003, name:'军区联勤时期' } ].concat(tmpYear); Vue.prototype.typeStr = { news: "新闻", notice: "公告" }; Vue.prototype.statusArr = [ { id:1, name:'草稿中' }, { id:2, name:'待审核' }, { id:3, name:'审核不通过' }, { id:4, name:'审核通过' } ] Vue.prototype.sysRole=[ { name:'系统管理员', id:'sys_admin' }, { name:'普通用户', id:'sys_normal' }, ] Vue.prototype.collectType = { 1:'专题图库', 2:'视频文件', 3:'模型文件' }; Vue.prototype.juese = { sys_admin: "系统管理员", sys_high: "高级管理员", sys_normal: "普通用户", sys_visitor: "游客", }; Vue.prototype.sex = { 0: "男", 1: "女" }; Vue.prototype.$serverName = serverName// 挂载到Vue实例上面 new Vue({ router, render: h => h(App) }).$mount('#app')