import 'babel-polyfill'
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI, { size: 'medium' })

import './styles/index.scss'
import './styles/transition.scss'
import './styles/theme.scss'

import './component'

import './permission'

// 表格宽度自适应指令
// import './directive/tableWidth'

//按钮的公共方法
Vue.prototype.$hasPermission = code => {
  if (store.getters.buttons && store.getters.buttons.includes(code)) {
    return true
  }
  return false
}

Vue.config.productionTip = false

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
