import Vue from 'vue'
import store from "./store"
import 'vue-country-intl/lib/vue-country-intl.css'
import i18n from './lang'
import App from './App.vue';
import VueMate from 'vue-meta'

import NoData from '@/components/noData'
import msgIcon from '@/components/msgIcon'
import searchIcon from '@/components/searchIcon'
import backIcon from '@/components/backIcon'
import shareIcon from '@/components/shareIcon'


import router from './router'
import './permission'
var bigDecimal = require('js-big-decimal');
import { numToThousand, handleDigits, handleDigits2, parseTime } from '@/utils/index'
import Vant from 'vant';
import 'element-ui/lib/theme-chalk/index.css';
import 'vant/lib/index.css';
Vue.use(Vant);
import '@/assets/css/index.less'
import { Form, FormItem, Input, InputNumber, Table, TableColumn, Tooltip, Upload, Select, Option, Progress, Autocomplete } from 'element-ui';

import Loading from "@/components/loading";
Vue.use(Loading.directive);

Vue.use(Form);
Vue.use(FormItem);
Vue.use(Input);
Vue.use(InputNumber);
Vue.use(Table);
Vue.use(TableColumn);
Vue.use(Tooltip);
Vue.use(Upload);
Vue.use(Select);
Vue.use(Option);
Vue.use(Progress);
Vue.use(Autocomplete);
Vue.use(VueMate)

Vue.component('NoData', NoData);
Vue.component('msgIcon', msgIcon);
Vue.component('searchIcon', searchIcon);
Vue.component('backIcon', backIcon);
Vue.component('shareIcon', shareIcon);

Vue.config.productionTip = false
Vue.prototype.$bigDecimal = bigDecimal
Vue.prototype.$parseTime = parseTime
Vue.prototype.$numToThousand = numToThousand
Vue.prototype.$handleDigits = handleDigits
Vue.prototype.$handleDigits2 = handleDigits2
Vue.prototype.$uploadUrl = process.env.VUE_APP_BASE_UPLOAD
Vue.prototype.$loading = Loading.service;
import './mixins'
new Vue({
  render: h => h(App),
  store,
  i18n,
  metaInfo() {
    return {
      title: this.$store.getters.metaInfo.title,
      meta: [
        {
          name: "keywords",
          content: this.$store.getters.metaInfo.keywords
        }, {
          name: "description",
          content: this.$store.getters.metaInfo.description
        }
      ]
    }
  },
  router,
}).$mount('#app')
