| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- // The Vue build version to load with the `import` command
- // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
- import Vue from 'vue'
- import 'normalize.css'
- import ElementUI from 'element-ui'
- import elementUIVerify from 'element-ui-verify'
- import ECharts from 'vue-echarts/components/ECharts.vue'
- import 'echarts/lib/chart/bar'
- import 'echarts/lib/chart/line'
- import 'echarts/lib/chart/pie'
- import 'echarts/lib/chart/heatmap'
- import 'echarts/lib/component/tooltip'
- import 'echarts/lib/component/polar'
- import 'echarts/lib/component/geo'
- import 'echarts/lib/component/legend'
- import 'echarts/lib/component/legendScroll'
- import 'echarts/lib/component/title'
- import 'echarts/lib/component/visualMap'
- import 'echarts/lib/component/dataset'
- // import Viser from 'viser-vue'
- import VueBus from 'vue-bus'
- import '@/assets/css/index-new.css'
- import '@/styles/index.scss'
- import Tip from '@/components/Tip'
- import VueIconFont from 'vue-icon-font'
- import i18n from './lang'
- import '@/assets/font/iconfont.css'
- import '@/icons'
- import '@/permission'
- import './mock'
- import { totalRowClassName } from '@/utils'
- import App from './App'
- import router from './router'
- import * as filters from './filters' // global filters
- import store from './store'
- Vue.config.devtools = true
- Vue.use(ElementUI, {
- size: 'mini'
- })
- Vue.use(elementUIVerify)
- Vue.use(VueIconFont)
- Vue.use(VueBus)
- // Vue.use(Viser)
- Vue.component('Tip', Tip)
- Vue.component('v-chart', ECharts)
- // register global utility filters.
- Object.keys(filters).forEach(key => {
- Vue.filter(key, filters[key])
- })
- Vue.config.productionTip = false
- Vue.mixin({
- data () {
- return {
- project: '',
- pageTitle: '线上分销系统'
- }
- },
- mounted () {
- this.project = (this.$route && this.$route.query.project) || localStorage.project || ''
- if (this.project) {
- const titleMap = {
- // cleartv: '徽黄科技'
- cleartv: ''
- }
- this.pageTitle = (titleMap[this.project] || '') + '线上分销系统'
- localStorage.project = this.project
- }
- },
- computed: {
- pagePermission () {
- return this.$route && this.$route.meta && this.$route.meta.permissionList ? this.$route.meta.permissionList : []
- }
- },
- methods: {
- totalRowClassName,
- checkPermission (type) {
- return this.pagePermission.indexOf(type) !== -1 || this.pagePermission.indexOf('all') !== -1
- }
- }
- })
- /* eslint-disable no-new */
- new Vue({
- el: '#app',
- router,
- store,
- i18n,
- components: { App },
- template: '<App/>'
- })
|