import * as AntIcon from '@ant-design/icons-vue';
import Antd from 'ant-design-vue';
import { createApp } from 'vue';
import App from './App.vue';
import './assets/global.less';
import './assets/theme.less';
import components from './components/global';
import Router from './router/index';
// 导入ele
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'


import jQuery from 'jquery';

// 将 jQuery 挂载到全局对象上
window.$ = window.jQuery = jQuery;

const app = createApp(App)
app.config.productionTip = false

// 挂载ele
app.use(ElementPlus)

// components
for (const i in components) {
  app.component(i, components[i])
}

// icon
for (const i in AntIcon) {
  const whiteList = ['createFromIconfontCN', 'getTwoToneColor', 'setTwoToneColor', 'default']
  if (!whiteList.includes(i)) {
    app.component(i, AntIcon[i])
  }
}

app.use(Antd).use(Router).mount('#app')
