import Vue from "vue";
import ViewUI from "view-design";
import axios from "axios";
import uploader from "vue-simple-uploader";
import App from "./App.vue";
import router from "./router";
import VueViewer, { directive as viewerDirective } from "v-viewer";
import "viewerjs/dist/viewer.css";
// 使用Viewer图片预览器
Vue.use(VueViewer);
Vue.directive(
  "viewer",
  viewerDirective({
    debug: false
  })
);
Vue.use(ViewUI);
Vue.prototype.$api = window._config;
Vue.use(uploader);
Vue.config.productionTip = false;

axios.defaults.baseURL = window._config.baseUrl;
Vue.prototype.axios = axios;
window.axios = axios;
window.vue = new Vue({
  router,
  render: (h) => h(App)
}).$mount("#app");
