import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import CacpUI from '@cacp/ui'

import 'normalize.css/normalize.css'
import 'element-plus/dist/index.css' //先引入element plus样式
import '@cacp/ui/dist/index.css' //后引入@cacp/ui样式
import './assets/main.less'

import App from './App.vue'
import router from './router'
import plugins from './plugins'
import directives from './directives'
import { pinia } from './stores'
import { addEventListener } from './utils/frame'
const app = createApp(App)

app.use(router)
app.use(plugins)
app.use(directives)
app.use(pinia)
// 绑定message监听
addEventListener()
app.use(ElementPlus, {
  locale: zhCn
})
app.use(CacpUI)

app.mount('#app')
