import Vue from 'vue'

import Cookies from 'js-cookie'

import 'normalize.css/normalize.css'

import Element, { Table, TableColumn } from 'element-ui'
const TableProps = Element.Table.props
const TableColumnProps = Element.TableColumn.props
TableProps.border = { type: Boolean, default: true } // 边框
TableProps.align = { type: String, default: 'center' } // 居中
TableProps.stripe = { type: Boolean, default: true } // 斑马纹
TableColumnProps.showOverflowTooltip = { type: Boolean, default: true } // 文本溢出
// TableColumnProps.sortable = { type: Boolean, default: true } // 置默认的排序列和排序顺序
Vue.use(Table)
Vue.use(TableColumn)

// 数据字典
import dict from './components/Dict'

import dataV from '@jiaminghi/data-view'

// 权限指令
import checkPer from '@/utils/permission'
import permission from './components/Permission'
import './assets/styles/element-variables.scss'

// global css
import './assets/styles/index.scss'

import App from './App'
import store from './store'
import router from './router/routers'

import './assets/icons' // icon
import './router/index' // permission control

Vue.use(checkPer)
Vue.use(permission)
Vue.use(dict)
Vue.use(dataV)
Vue.use(Element, {
  size: Cookies.get('size') || 'small' // set element-ui default size
})

Vue.config.productionTip = false

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