添加营销系统模块
This commit is contained in:
39
src/main.js
Normal file
39
src/main.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import Vue from 'vue'
|
||||
|
||||
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
|
||||
|
||||
import ElementUI from 'element-ui'
|
||||
import 'element-ui/lib/theme-chalk/index.css'
|
||||
|
||||
import '@/styles/index.scss' // global css
|
||||
|
||||
import App from './App'
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import echarts from 'echarts'
|
||||
import '@/icons' // icon
|
||||
import '@/permission' // permission control
|
||||
import curd from '@/utils/curd'
|
||||
import time from 'time-formater'
|
||||
|
||||
Vue.use(curd)
|
||||
|
||||
Vue.use(ElementUI)
|
||||
// 处理时间字符串格式全局过滤器 '2018/1/23 00:00:00' to '2018-01-23'
|
||||
Vue.filter('formatTime', function(value) {
|
||||
if (!value) return ''
|
||||
const isTime = /^\d{4}([-\/.])\d{1,2}\1\d{1,2}/
|
||||
if (!isTime.test(value)) return value
|
||||
let result = time(value).format('YYYY-MM-DD')
|
||||
result = result.indexOf('1900-01-01') > -1 ? '' : result
|
||||
return result
|
||||
})
|
||||
Vue.prototype.$echarts = echarts
|
||||
Vue.config.productionTip = false
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
router,
|
||||
store,
|
||||
render: h => h(App)
|
||||
})
|
||||
Reference in New Issue
Block a user