/* jshint esversion: 6 */
import {initRemove} from "./js/utils.js";
initRemove();
import 'element-ui/lib/theme-chalk/display.css';
import {
  Button,
  Upload,
  Container,
  Header,
  Aside,
  Main,
  Footer,
  Loading,
  MessageBox,
  Message,
  Notification,
  Form,
  FormItem,
  Row,
  Col,
  Menu,
  Submenu,
  MenuItem,
  MenuItemGroup,
  Breadcrumb,
  BreadcrumbItem,
  Dropdown,
  DropdownMenu,
  DropdownItem,
  Select,
  Option,
  Input,
  table,
  tableColumn,
  pagination,
  Dialog,
  Autocomplete,
  DatePicker,
  TimeSelect,
  TimePicker,
  Checkbox,
  CheckboxGroup,
  Radio,
  RadioGroup,
  Scrollbar,
  Tag,
  Popover,
  Tooltip,
  Collapse,
  CollapseItem
} from 'element-ui';
Vue.use(Collapse);
Vue.use(CollapseItem);
Vue.use(Button);
Vue.use(Upload);
Vue.use(Input);
Vue.use(Container);
Vue.use(Header);
Vue.use(Main);
Vue.use(Aside);
Vue.use(Footer);
Vue.use(Loading.directive);
Vue.use(Form);
Vue.use(FormItem);
Vue.use(Row);
Vue.use(Col);
Vue.use(Menu);
Vue.use(Submenu);
Vue.use(MenuItem);
Vue.use(MenuItemGroup);
Vue.use(Select);
Vue.use(Option);
Vue.use(table);
Vue.use(tableColumn);
Vue.use(pagination);
Vue.use(Dialog);
Vue.use(Breadcrumb);
Vue.use(BreadcrumbItem);
Vue.use(Dropdown);
Vue.use(DropdownMenu);
Vue.use(DropdownItem);
Vue.use(Autocomplete);
Vue.use(DatePicker);
Vue.use(TimeSelect);
Vue.use(TimePicker);
Vue.use(Popover);
Vue.use(Checkbox);
Vue.use(CheckboxGroup);
Vue.use(Radio);
Vue.use(RadioGroup);
Vue.use(Scrollbar);
Vue.use(Tag);
Vue.use(Tooltip);
Vue.prototype.$loading = Loading.service;
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$prompt = MessageBox.prompt;
Vue.prototype.$notify = Notification;
Vue.prototype.$message = Message;

import echarts from './js/echarts';
Vue.prototype.$echarts = echarts;

// 入口文件为 src/App.vue 文件 所以要引用
import App from './App.vue';
// 引用路由配置文件
import routes from './config/routes';

// 引用API文件
import api from './config/api';

// 将API方法绑定到全局
Vue.prototype.$api = api;
window.myAxios = api;

import store from './store';

// 使用配置文件规则
const router = new VueRouter({
  mode: 'history',
	base: '/',
  scrollBehavior:()=>({ // 滚动条滚动的行为，不加这个默认就会记忆原来滚动条的位置
　   y:0
  }),
  routes
});
// 跑起来吧
//document.getElementById('LOADING').style.display='none';

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