import Plugins from '@/utils/plugins';
import Particles from 'vue-particles';
// 基于 element-ui 2.x 扩展下拉带树的组件 下拉树状菜单
import ElTreeSelect from 'el-tree-select';
import Element from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import '@/theme/index.scss';
import CmsLoading from '@/comps/CmsLoading'
import { i18n } from '@/utils/i18ns';
import http from '@/utils/https'
import messageTips from '@/utils/messageTips';
// 导出指令
import directive from '@/utils/plugins/directive'
import { globalComponentSize } from '@/utils/componentSize.js';

export const plugins = (Vue) => {
  directive(Vue);
  Vue.use(Plugins);
  Vue.use(Particles);
  Vue.use(ElTreeSelect);
  Vue.use(Element, { i18n: (key, value) => i18n.t(key, value), size: globalComponentSize });
  window.$bus = Vue.prototype.$bus = Vue.prototype.bus = new Vue();
  Vue.prototype.$messageTips = messageTips;
  Vue.config.productionTip = false;
  Vue.prototype.$loading = CmsLoading;
  Vue.prototype.$http = http;
}