import Vue from "vue";
import App from "./App.vue";
import store from "./store";
import router from "./router/index";
import "./common/vueFilters";
import "babel-polyfill";
import {
  Button,
  Icon,
  Tag,
  Swipe,
  SwipeItem,
  Popup,
  Picker,
  DropdownMenu,
  DropdownItem,
  Search,
  PullRefresh,
  Toast,
  List,
  Collapse,
  CollapseItem,
  Tab,
  Tabs,
  Row,
  Col,
  Cell,
  CellGroup,
  Circle,
  Field,
  DatetimePicker,
  Image,
  Loading,
  ActionSheet,
  RadioGroup,
  Radio,
  Checkbox,
  CheckboxGroup,
  CountDown,
  Panel,
  Dialog,
  Sticky,
  Rate,
  Switch,
  ImagePreview,
  NoticeBar,
  NavBar,
  Divider,
  Grid,
  GridItem,
  Calendar,
  Empty,
  Uploader,
  Stepper,
  SubmitBar,
  Slider,
} from "vant";
Vue.use(Button)
  .use(Icon)
  .use(Tag)
  .use(Swipe)
  .use(SwipeItem)
  .use(Popup)
  .use(Picker)
  .use(DropdownMenu)
  .use(DropdownItem)
  .use(Search)
  .use(PullRefresh)
  .use(Toast)
  .use(List)
  .use(Collapse)
  .use(CollapseItem)
  .use(Tab)
  .use(Tabs)
  .use(Row)
  .use(Col)
  .use(Cell)
  .use(CellGroup)
  .use(Circle)
  .use(Field)
  .use(DatetimePicker)
  .use(Image)
  .use(Loading)
  .use(ActionSheet)
  .use(RadioGroup)
  .use(Radio)
  .use(Checkbox)
  .use(CheckboxGroup)
  .use(CountDown)
  .use(Panel)
  .use(Dialog)
  .use(Sticky)
  .use(Rate)
  .use(Switch)
  .use(ImagePreview)
  .use(NoticeBar)
  .use(NavBar)
  .use(Divider)
  .use(Grid)
  .use(GridItem)
  .use(Calendar)
  .use(Empty)
  .use(Uploader)
  .use(Stepper)
  .use(SubmitBar)
  .use(Slider);

Vue.config.productionTip = false;

// import Vconsole from 'vconsole'
// const vconsole = new Vconsole()
// 将selects全局混入当前vue实例中
Vue.mixin({
  data() {
    return {
      activeButtonIcon: require("@/assets/images/common/icon_check.png"),
      inactiveButtonIcon: require("@/assets/images/common/icon_default.png"),
    };
  },
});

import eIconPicker, { eIconSymbol } from "e-icon-picker";
import "e-icon-picker/lib/symbol.js"; //基本彩色图标库
import "e-icon-picker/lib/index.css"; // 基本样式，包含基本图标
import "font-awesome/css/font-awesome.min.css"; //font-awesome 图标库
import iconfont from "./assets/icon_font/iconfont.json";
import "./assets/icon_font/iconfont.css"; // 引入css
import "./assets/icon_font/iconfont.js"; // 引入css
const forIconfont = eIconSymbol(iconfont); // 解析彩色图标
// 全局删除增加图标
Vue.use(eIconPicker, {
  FontAwesome: false,
  ElementUI: false,
  eIcon: false, // 自带的图标，来自阿里妈妈
  eIconSymbol: true, // 是否开启彩色图标
  addIconList: forIconfont.list,
  removeIconList: [],
}); // 全局注册图标

import VueAMap from "vue-amap";
Vue.use(VueAMap);
VueAMap.initAMapApiLoader({
  key: "ac943ac1522de0d63eb8a99b71fe2601",
  plugin: ["Geolocation", "PlaceSearch", "Geocoder", "ToolBar"],
  v: "1.4.4",
});

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