import Vue from 'vue'
import {
  Breadcrumb, BreadcrumbItem,
  Button, Checkbox,
  CheckboxGroup, Dialog,
  Drawer, Message,
  Popover, Radio,
  RadioGroup, TabPane,
  Tabs,
  Tree,
} from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(Button)
Vue.use(Popover)
Vue.use(Dialog)
Vue.use(Drawer)
Vue.use(Tree)
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(Checkbox)
Vue.use(CheckboxGroup)
Vue.use(Breadcrumb)
Vue.use(BreadcrumbItem)
Vue.use(Tabs)
Vue.use(TabPane)

Vue.prototype.$message = {
  error(msg) {
    Message.closeAll()
    Message.error(msg)
  },
  success(msg) {
    Message.closeAll()
    Message.success(msg)
  },
}
