/*
 * @Description:: 请补充填写
 * @Version: 请配置版本号
 * @Author: 舟舟
 * @Date: 2022-06-25 22:32:24
 * @LastEditors: 舟舟
 * @LastEditTime: 2022-08-01 07:42:58
 * @FilePath: /ouicai_web_framework_vite_ep_nolang/src/main.ts
 */
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import { registerIcons } from '/@/utils/common'
import ElementPlus from 'element-plus'
import VForm3 from 'vform3-builds'
import mitt from 'mitt'
import pinia from '/@/stores/index'
import { directives } from '/@/utils/directives'
import 'element-plus/dist/index.css'
import 'vform3-builds/dist/designer.style.css'
// import 'default-passive-events'

import '/@/styles/base.scss'
import 'flex.box'

async function start() {
    const app = createApp(App)

    app.use(router)
    app.use(pinia)

    // 全局语言包加载

    app.use(ElementPlus)
    app.use(VForm3)
    // 全局注册
    directives(app) // 指令
    registerIcons(app) // icons

    app.mount('#app')

    app.config.globalProperties.eventBus = mitt()
}
start()
