You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
1.9 KiB
74 lines
1.9 KiB
![]()
1 year ago
|
|
||
|
import 'babel-polyfill'
|
||
|
import Vue from 'vue'
|
||
|
import router from './router'
|
||
|
import Cookies from 'js-cookie'
|
||
|
import Element from 'element-ui'
|
||
|
import { UTable, UTableColumn } from 'umy-ui'
|
||
|
Vue.use(UTable)
|
||
|
Vue.use(UTableColumn)
|
||
|
import App from './App'
|
||
|
import store from './store'
|
||
|
import * as filters from './filters' // 全局过滤器
|
||
|
import GlobalComponents from '@/utils/global-components' // 全局组件
|
||
|
import '@/directive/index.js' // 全局指令
|
||
|
import permission from '@/directive/permission/index.js' // 权限判断指令
|
||
|
import dragDialog from '@/directive/el-drag-dialog/index.js' // 拖拽弹窗
|
||
|
import dragDrawer from '@/directive/el-drag-drawer/index.js' // 拖拽抽屉
|
||
|
import * as utils from './utils'
|
||
|
|
||
|
import htmlToPdf from '@/utils/htmlToPdf'
|
||
|
Vue.use(htmlToPdf)
|
||
|
|
||
|
import 'normalize.css/normalize.css'
|
||
|
import 'vue2-animate/dist/vue2-animate.min.css'
|
||
|
|
||
|
import './styles/element-variables.scss'
|
||
|
import 'element-ui/lib/theme-chalk/display.css'
|
||
|
import 'wowjs/css/libs/animate.css'
|
||
|
import '@/styles/index.scss'
|
||
|
import './icons' // icon
|
||
|
import './permission' // permission control
|
||
|
import { getToken, setToken, removeToken } from '@/utils/auth.js'
|
||
|
import pagesHeader from '@/components/pagesHeader';
|
||
|
|
||
|
import SlideVerify from 'vue-monoplasty-slide-verify'
|
||
|
import '@/theme/index.scss';
|
||
|
|
||
|
Vue.use(SlideVerify)
|
||
|
Vue.use(permission)
|
||
|
Vue.use(dragDialog)
|
||
|
Vue.use(dragDrawer)
|
||
|
Vue.use(GlobalComponents)
|
||
|
Vue.component('pagesHeader', pagesHeader);
|
||
|
|
||
|
if (process.env.NODE_ENV === 'production') {
|
||
|
// 切换环境时执行代码
|
||
|
}
|
||
|
|
||
|
Vue.use(Element, {
|
||
|
size: Cookies.get('size') || 'medium' // 设置饿了么ui默认大小
|
||
|
})
|
||
|
|
||
|
Object.keys(filters).forEach(key => {
|
||
|
// console.log('key', key)
|
||
|
Vue.filter(key, filters[key])
|
||
|
})
|
||
|
|
||
|
Vue.config.productionTip = false
|
||
|
Vue.prototype.$utils = utils
|
||
|
|
||
|
new Vue({
|
||
|
el: '#app',
|
||
|
router,
|
||
|
store,
|
||
|
beforeMount() {
|
||
|
Vue.prototype.$cookieStore = {
|
||
|
setToken,
|
||
|
getToken,
|
||
|
removeToken
|
||
|
}
|
||
|
},
|
||
|
render: h => h(App)
|
||
|
})
|