import Vue from 'vue'
|
import Element from 'element-ui'
|
import App from './App'
|
import store from './store'
|
import router from './router'
|
import filter from './filter'
|
import g_fn_install from './utils/g_fn_install' // 挂载全局方法
|
import http_install from './utils/http_install' // 引入全局http请求 安装文件
|
|
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
|
import './styles/element-variables.scss'
|
import 'element-ui/lib/theme-chalk/index.css'
|
import '@/styles/index.scss' // global css
|
import '@/styles/ry.scss' // ruoyi css
|
import '@/styles/style.css' // global css
|
import '@/styles/common.scss' // global common css
|
import '@/icons' // icon
|
import '@/permission' // permission control
|
// 分页
|
import Pagination from '@/components/Pagination'
|
// 自定义表格工具扩展
|
import RightToolbar from '@/components/RightToolbar'
|
|
// 过滤器统一处理加载
|
Object.keys(filter).forEach(key => {
|
Vue.filter(key, filter[key])
|
})
|
|
Vue.use(Element)
|
Vue.use(g_fn_install)// 安装全局方法
|
Vue.use(http_install) // 安装全局请求文件
|
|
// 全局组件挂载
|
Vue.component('Pagination', Pagination)
|
Vue.component('RightToolbar', RightToolbar)
|
|
Vue.prototype.$messageSuc = function(msg) {
|
this.$message({ message: msg, dangerouslyUseHTMLString: true, type: 'success' })
|
}
|
Vue.prototype.$messagewarn = function(msg) {
|
this.$message({ message: msg, dangerouslyUseHTMLString: true, type: 'warning' })
|
}
|
Vue.prototype.$messageError = function(msg) {
|
this.$message({ message: msg, dangerouslyUseHTMLString: true, type: 'error' })
|
}
|
|
Vue.config.productionTip = false
|
|
new Vue({
|
el: '#app',
|
router,
|
store,
|
render: h => h(App)
|
})
|