import Vue from "vue";
import App from "./App.vue";
import store from "./store";
import router from "./router";

import FTabs from "@/components/Tabs";
import FPages from "@/components/FPages.vue";
import { HotTable } from "@handsontable/vue";
import "handsontable/dist/handsontable.full.css";
import 'ant-design-vue/dist/antd.less';
import DragModal from "./components/DragModal";
import vcolorpicker from './components/vcolorpicker';
import SnakerFlowDesigner from "./components/SnakerFlowDesigner/src/snakerflow";
import './utils/drag.js';
import Element from 'element-ui';
Vue.component("FTabs", FTabs);
Vue.component("HotTable", HotTable);
Vue.component("FPages", FPages);
Vue.component("DragModal", DragModal);
Vue.component("SnakerFlowDesigner", SnakerFlowDesigner);
Vue.use(Element);
import { VoBasic } from "vue-orgchart";
import "vue-orgchart/dist/style.min.css";
import Jquery_contextmenu from 'jquery-contextmenu';
import 'jquery-contextmenu/dist/jquery.contextMenu.css';
import 'jquery-contextmenu/dist/jquery.ui.position.js';
Vue.use(VoBasic);
Vue.use(vcolorpicker);
Vue.use(Jquery_contextmenu);
import '@ztree/ztree_v3/js/jquery.ztree.core.min.js'
import '@ztree/ztree_v3/js/jquery.ztree.excheck.min.js'
import '@ztree/ztree_v3/js/jquery.ztree.exhide.min.js'
import '@ztree/ztree_v3/js/jquery.ztree.exedit.min.js'
import '@ztree/ztree_v3/css/metroStyle/metroStyle.css'
import i18n from "./locales";
import "@/styles/index.scss"; //样式 by zqs
import preventReClick from "./utils/preventReClick";

import "@/styles/index.less";
import '@/assets/fonts/css/font.css';
// using ES6 modules
import VueSplit from "vue-split-panel";
Vue.use(VueSplit);

import { common } from "./common/common";
Vue.prototype.$com = common;

import cdrag from "@/directive/drag-content/index.js"; // 让某个容器，可以拖拽，缩放
Vue.use(cdrag);

import drag from "@/directive/el-drag-dialog/index.js"; // 让某个容器，可以拖拽，缩放
Vue.use(drag);

import base from "./base"; //引用
Vue.use(base); //将全局函数当做插件来进行注册

import html2Canvas from "html2canvas";
import JsPDF from "jspdf";
import "./icons";
import "@/icons/ali-icons/iconfont.css";
import "@/icons/3rd-icons/style.css";

import Loading from 'vue-loading-overlay';
import 'vue-loading-overlay/dist/vue-loading.css';
Vue.use(Loading);

import XEUtils from 'xe-utils';
import VXEUtils from 'vxe-utils';
// mounts 可以设置['cookie', 'browse', 'locat']
Vue.use(VXEUtils, XEUtils, {mounts: ['cookie']});
Vue.config.productionTip = false;

import {
  Cascader,
  Layout,
  Upload,
  Tabs,
  Button,
  Row,
  Col,
  DatePicker,
  Table,
  Form,
  Input,
  Icon,
  Menu,
  Dropdown,
  Card,
  Tree,
  Drawer,
  Select,
  Modal,
  Collapse,
  Affix,
  TreeSelect,
  Comment,
  List,
  Switch,
  AutoComplete,
  Tooltip,
  Pagination,
  FormModel,
  notification,
  Radio,
  Checkbox,
  Spin,
  Message,
  ConfigProvider,
  Popover,
  Badge,
  InputNumber,
  Divider,
  Transfer,
  Tag
} from "ant-design-vue";
Vue.use(Cascader)
  .use(Layout)
  .use(Upload)
  .use(Tabs)
  .use(Tag)
  .use(Button)
  .use(Row)
  .use(Col)
  .use(DatePicker)
  .use(Table)
  .use(Form)
  .use(Input)
  .use(Icon)
  .use(Menu)
  .use(Dropdown)
  .use(Tree)
  .use(Card)
  .use(Drawer)
  .use(Tabs)
  .use(Select)
  .use(Collapse)
  .use(Modal)
  .use(TreeSelect)
  .use(Comment)
  .use(List)
  .use(Switch)
  .use(AutoComplete)
  .use(Tooltip)
  .use(Pagination)
  .use(FormModel)
  .use(notification)
  .use(Radio)
  .use(Checkbox)
  .use(Spin)
  .use(Message)
  .use(ConfigProvider)
  .use(Popover)
  .use(Badge)
  .use(InputNumber)
  .use(Divider)
  .use(Transfer)
Vue.prototype.$notification = notification;
Vue.prototype.$confirm = Modal.confirm;
Vue.prototype.$message = Message;//简单用一下，后面可能要改
console.log(Message)
import { api } from "./providers/http";
Vue.prototype.$api = api;
import "babel-polyfill";
//表格拖拽
import './styles/aTableColumnsDraggable.less';
import VueDraggableResizable from 'vue-draggable-resizable';
Vue.component('vue-draggable-resizable', VueDraggableResizable);

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