1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- import Vue from 'vue';
- import 'normalize.css/normalize.css';
- import ElementUI from 'element-ui';
- import 'element-ui/lib/theme-chalk/index.css';
- import locale from 'element-ui/lib/locale/lang/en';
- import '@/styles/index.scss';
- import App from './App';
- import store from './store';
- import router from './router';
- import '@/icons';
- import '@/permission';
- import './components';
- import './containers';
- import 'utils/dialog-helper';
- import '@/plugins/viewerjs';
- import message from '@/utils/message';
- import bus from './utils/bus';
- import DICT from '@/const/dictType';
- import TABLECOLSIZE from '@/const/tableColSize';
- import Moment from 'moment';
- Vue.prototype.$Bus = bus;
- Vue.prototype.$g_emit = (eventName, payload) => {
- bus.$emit(eventName, payload);
- };
- Vue.prototype.$g_on = (eventName, func) => {
- bus.$on(eventName, func);
- };
- Vue.prototype.$g_off = (eventName, func) => {
- bus.$off(eventName, func);
- };
- if (process.env.NODE_ENV === 'production') {
- const { mockXHR } = require('../mock');
- mockXHR();
- }
- Vue.use(ElementUI, { size: 'small', zIndex: 3000 });
- Vue.config.productionTip = false;
- Vue.prototype.$success = message.success;
- Vue.prototype.$error = message.error;
- Vue.prototype.$warning = message.warning;
- Vue.prototype.$moment = Moment;
- Vue.prototype.$dict = DICT;
- Vue.prototype.$col = TABLECOLSIZE;
- Vue.prototype.$upload = url => `${process.env.VUE_APP_BASE_API}${url}`;
- window.UEDITOR_CONFIG = `${process.env.VUE_APP_BASE_API}/yxl-back-end/framework/oss/ueditor/ueditor-action`;
- window.UEDITOR_SERVER_URL = `${process.env.VUE_APP_BASE_API}/yxl-back-end/framework/oss/ueditor/ueditor-action`;
- Vue.prototype.$filterRichTxt = str => {
- if (!str) return '';
- return str.replace(/<img/g, '<img width="100%"');
- };
- new Vue({
- el: '#app',
- router,
- store,
- render: h => h(App)
- });
|