import Vue from 'vue'
import Element from 'element-ui'
import locale from 'element-ui/lib/locale/lang/zh-CN' // 中文
import '@/styles/element-variables.scss'
import ElementExtends from './extends'

const moduleLoaders = require.context('./components', true, /index\.js$/)

Vue.use(Element, { locale })

for (const modulePath of moduleLoaders.keys()) {
  const module = moduleLoaders(modulePath)
  module.default.install(Vue)
}

ElementExtends(Vue)
