1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- import Vue from 'vue'
- import directive from './directive'
- import 'normalize.css/normalize.css' // A modern alternative to CSS resets
- import ElementUI, {Message, MessageBox} from 'element-ui'
- import 'element-ui/lib/theme-chalk/index.css'
- import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n
- import 'font-awesome/scss/font-awesome.scss'
- import '@/styles/index.scss' // global css
- import 'xe-utils'
- import moment from 'moment'
- import plugins from './plugins' // plugins
- import App from './App'
- import store from './store'
- import router, {resetRouter} from './router'
- import '@/icons' // icon
- import '@/permission' // permission control
- // import axios from 'axios'
- import VXETable from 'vxe-table'
- import 'vxe-table/lib/index.css'
- import service from './utils/request'
- import {removeToken} from './utils/auth'
- // import { resetForm} from "@/utils/index"
- import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"
- Vue.prototype.$moment = moment
- Vue.prototype.$axios = service
- Vue.use(VXETable)
- Vue.use(plugins)
- Vue.use(directive)
- Vue.prototype.handleTree = handleTree
- /**
- * 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 ! ! !
- */
- /* if (process.env.NODE_ENV === 'production') {
- const { mockXHR } = require('../mock')
- mockXHR()
- }*/
- // set ElementUI lang to EN
- Vue.use(ElementUI, {locale})
- // 如果想要中文版 element-ui,按如下方式声明
- // Vue.use(ElementUI)
- Vue.prototype.$fpath = require('path')
- Vue.config.productionTip = false
- VXETable.setup({
- validArgs: 'obsolete' // 将自定义校验参数还原为 Function(rule, cellValue, callback)
- })
- Vue.prototype.resetForm = resetForm
- Vue.prototype.parseTime = parseTime
- new Vue({
- el: '#app',
- router,
- store,
- render: h => h(App)
- })
|